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. Used for function calls and local variables






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






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






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






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






6. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






7. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






9. Lists and tables of values can be stored in arrays or __________.






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






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






12. int namespace include using return examples of ___________






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






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






15. A function is invoked with a ________.






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






17. Creates a copy of a string.






18. A C++ statement that makes a decision is ______.






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






20. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






21. Grammar rules of the language; compiler will try to identify and locate syntax errors






22. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






23. tab






24. An expression that has operands with different data types






25. Identifier or expression that is part of the calculation to be performed






26. This is used to mark the end of a complete C++ programming statement.






27. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






28. A memory location with a name and data type - its content may be changed during program execution






29. Forces the computer to display decimal point and trailing zeroes






30. An operator that can only be used with int values. result will always be an int.






31. Preprocessor directive syntax






32. A filestream variable that represents the default input source






33. = & | are examples of ____________.






34. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






37. Function ________ is used to produce random numbers.






38. * / % + -






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






40. Operator with only one operand






41. Names of things that are used in a program - can apply to variables & constants and functions






42. The three values that can be used to initialize a pointer are 0 - __________ and an address.






43. The stream insertion operator






44. Compares two strings and returns 0 if they are equal.






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






46. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






47. When a value of one data type is implicitly (automatically) changed to another data type






48. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






50. A pointer is a variable that contains as its value the____________ of another variable.