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






2. The _________ begins the body of every function and the _________ ends the body of every function.






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






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






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






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






7. The elements of an array are related by the fact that they have the same name and ___________.






8. The address-of operator. it is used to assign pointers and to print the address of variables.






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






10. The stream extraction operator






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






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






13. Function ________ is used to produce random numbers.






14. Classes can have relationships with other classes. These relationships are called ________.






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






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






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






18. Repeating a set of instructions a specific number of times is called_________repetition.






19. The process of determining if an array contains a particular key value is called _________ the array.






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






21. int namespace include using return examples of ___________






22. An expression in which all operands have the same data type - result will have the same data type as operands






23. Sets floating-point values to a fixed decimal format






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






25. This manipulator is used to establish a field width for the value immediately following it.






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






27. The ________ statement in a called function passes the value of an expression back to the calling function.






28. Associate an identifier with a memory location






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






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






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






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






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






34. You must have a ___________ for every variable you intend to use in a program






35. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






36. tab






37. The only integer that can be assigned directly to a pointer is_____________.






38. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






39. Whole numbers - no decimals and no commas included






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






41. The modulus operator (%) can be used only with __________.






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






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






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






45. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






46. Used to qualify hidden names so that they can be used.






47. Creates a copy of a string.






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






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






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