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. The symbol for the binary scope resolution operator






2. This manipulator causes the field to be left-justified with padding spaces printed to the right.






3. tab






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






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






6. Words that are used for special purposes in a program






7. 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






8. Use 2 characters to represent one






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






10. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






12. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






13. The sign you use for pointers






14. Nonexecutable statements that are included in a program to provide information about what the program does etc.






15. Most calculations are normally performed by ______ statements.






16. A set of values together with a set of operations






17. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.






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






19. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






21. For every opening brace in a C++ program there must be a ______________.






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






23. The sign you use for references






24. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






26. A ________ program executes before the compiler's translation phase begins.






27. Header file that contains commonly performed mathematical functions






28. To explicitly indicate that a value is to be converted to another type






29. The _____ causes the contents of another file to be inserted into a program.






30. Operator with only one operand






31. A function that calls itself






32. A __________ data member represents class-wide information.






33. A variable that is known only within the function in which it is defined is called a ________.






34. Symbol that denotes an action to be performed






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






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






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






38. You can declare default values for a function in the ____________________.






39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






41. = & | are examples of ____________.






42. The ________ qualifier is used to declare read-only variables.






43. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






44. The __________ operator reclaims memory previously allocated by new.






45. All ______ must be declared before they are used.






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






47. A filestream variable that represents the default input source






48. Operator with two operands






49. Two slash marks ( // ) indicate __________ of a comment






50. A sequence of operands and operators that describe a calculation to be performed