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 sign you use for pointers






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






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






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






5. A function is invoked with a ________.






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






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






8. int namespace include using return examples of ___________






9. Preprocessor directive syntax






10. newline






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






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






13. The stream insertion operator






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






15. Header file that contains commonly performed mathematical functions






16. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






19. The number used to refer to a particular element of an array is called its ________.






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






21. Whole numbers - no decimals and no commas included






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






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






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






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






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






27. This manipulator is used to establish a field width for the value immediately following it.






28. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






30. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






32. Function ________ is used to set the random number seed to randomize a program.






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






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






35. Compares two strings and returns 0 if they are equal.






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






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






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






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






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






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






42. The stream extraction operator






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






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






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






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






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






48. The size & shape & color and weight of an object are considered






49. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






50. Symbol that denotes an action to be performed