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. A member function should be declared static if it does not access __________ class members.






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






3. Most calculations are normally performed by ______ statements.






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






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






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






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






8. A function that calls itself






9. The sign you use for references






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






11. The stream extraction operator






12. Member objects are constructed __________ their enclosing class object.






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






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






15. A filestream variable that represents the default output device






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






17. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






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






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






20. Preprocessor directive syntax






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






22. Function ________ is used to produce random numbers.






23. Associate an identifier with a memory location






24. * / % + -






25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






26. Default name of executable file






27. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






28. Symbol that denotes an action to be performed






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






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






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






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






33. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






41. In inheritance the ____________ is the class that supplies the inherited members.






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






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






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






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






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






47. Keyword public is a(n) _________






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






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






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