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 __________ operator reclaims memory previously allocated by new.






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






3. A function is invoked with a ________.






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






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






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






7. All C++ Variables are_________.






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






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






10. Operator with only one operand






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






12. Used for function calls and local variables






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






14. Use 2 characters to represent one






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






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






17. The sign you use for pointers






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






19. tab






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






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






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






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






24. int namespace include using return examples of ___________






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






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






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






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






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






30. A filestream variable that represents the default input source






31. The _________ begins the body of every function and the _________ ends the body of every function.






32. Function ________ is used to produce random numbers.






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






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






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






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






37. * / % + -






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






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






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






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






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






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






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






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






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






47. Operator with two operands






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






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






50. Default name of executable file