Test your basic knowledge |

C++ Programming Basics

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. directive A statement that starts with a # is called a ____________.






2. A variable that holds the address of another variable.






3. The process of placing the elements of an array in order is called ________ the array.






4. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






5. Every C++ statement ends with a(n) _________.






6. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






7. Default name of executable file






8. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






9. Used for dynamically allocated variables






10. In inheritance the ____________ is the class the receives the inherited members.






11. A constant object must be __________; it cannot be modified after it is created.






12. The process of analyzing and designing a system from an object-oriented point of view is called ________.






13. * / % + -






14. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






15. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






16. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






17. The stream insertion operator






18. The size & shape & color and weight of an object are considered






19. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






20. The idea that you can call the same function and the output will depend on the type of object you're using.






21. int namespace include using return examples of ___________






22. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






23. A file must be ________ before data can be written to or read from it.






24. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






25. Creates a copy of a string.






26. Whole numbers - no decimals and no commas included






27. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






28. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






29. Class members specified as _________ are accessible anywhere an object of the class is in scope.






30. A function is invoked with a ________.






31. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






33. The symbol for the binary scope resolution operator






34. Characters used to separate symbols or reserved words or identifiers and statements






35. The number used to refer to a particular element of an array is called its ________.






36. A type of pointer that can point at objects of any data type.






37. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






38. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






39. An array that uses two subscripts is referred to as a(n) _________ array.






40. A human readable file that contains C++ program






41. All C++ Variables are_________.






42. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






43. These are data items whose values do not change while the program is running






44. Allows the programmer to store a value in a variable






45. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






46. The stream extraction operator






47. If a member initializer is not provided for a member object of a class the object's __________ is called.






48. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






49. Operator with only one operand






50. The ________ enables access to a global variable with the same name as a variable in the current scope.






Can you answer 50 questions in 15 minutes?



Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests