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. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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






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






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






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






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






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






9. A member function should be declared static if it does not access __________ class members.






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






11. Associate an identifier with a memory location






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






13. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






15. Function ________ is used to produce random numbers.






16. A variable declared outside any block or function is a ________ variable.






17. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






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






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






22. = & | are examples of ____________.






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






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






25. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






27. A function ________ enables a single function to be defined to perform a task on many different data types.






28. An expression that has operands with different data types






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






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






31. __________ can be used to assign an object of a class to another object of the same class.






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






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






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






35. Message displayed to the screen asking user for input; generated with an output statement






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






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






38. Most calculations are normally performed by ______ statements.






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






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






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






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






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






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






45. Executable version of program






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






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






48. Initializers __________ must be used to initialize constant members of a class.






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






50. A filestream variable that represents the default output device