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 escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






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






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






8. Header file that contains commonly performed mathematical functions






9. Characters used to separate symbols or reserved words or identifiers and statements






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






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






12. An expression that has operands with different data types






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






14. Use 2 characters to represent one






15. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






18. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






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






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






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






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






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






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






32. To explicitly indicate that a value is to be converted to another type






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






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






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






36. The ________ program transfers the executable image of a C++ program from disk to memory.






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






38. * / % + -






39. tab






40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






41. A function that can be used to read character data including whitespace






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






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






44. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






45. A filestream variable that represents the default output device






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. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






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






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