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. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






2. * / % + -






3. Operator with only one operand






4. C++ programs are normally typed into a computer using a(n) ________ program.






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






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






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






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






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






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






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






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






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






14. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






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






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






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






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






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






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






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






23. tab






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






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






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






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






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






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






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






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






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






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






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






35. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






36. Naming convention for C++ programs






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






38. A filestream variable that represents the default input source






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






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






41. Used for function calls and local variables






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






43. Operator with two operands






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






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






46. Function ________ is used to produce random numbers.






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






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






49. A constant object must be __________; it cannot be modified after it is created.






50. You can declare default values for a function in the ____________________.