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 __________ data member represents class-wide information.






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






3. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






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






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






7. The stream insertion operator






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






9. Header file that contains commonly performed mathematical functions






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






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






12. Returns the length of a string excluding the null terminator.






13. These are data items whose values do not change while the program is running






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






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






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






17. Operator with two operands






18. Syntax for named constant declaration






19. This is used to mark the end of a complete C++ programming statement.






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






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






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






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






24. Used for dynamically allocated variables






25. Keyword public is a(n) _________






26. Use 2 characters to represent one






27. A filestream variable that represents the default input source






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






29. The symbol for the binary scope resolution operator






30. = & | are examples of ____________.






31. * / % + -






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






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






34. A ________ program executes before the compiler's translation phase begins.






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






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






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






38. Preprocessor directive syntax






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






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






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






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






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






44. Operator with only one operand






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






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






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






48. The sign you use for references






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






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