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 ________ statement in a called function passes the value of an expression back to the calling function.






2. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






3. Syntax for named constant declaration






4. Executable version of program






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






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






7. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






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






11. An expression that has operands with different data types






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






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






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






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






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






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






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






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






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






21. Type casting syntax






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






23. Function ________ is used to produce random numbers.






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






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






26. int namespace include using return examples of ___________






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






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






29. Used for function calls and local variables






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






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






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






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






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






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






36. Every C++ program begins execution at the function _________.






37. Most calculations are normally performed by ______ statements.






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






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






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






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






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






43. A filestream variable that represents the default output device






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






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






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






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






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






49. A __________ should be used to declare the size of an array because it makes the program more scalable.






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