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 new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.






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






3. The process of placing the elements of an array in order is called ________ the array.






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






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






6. The __________ operator reclaims memory previously allocated by new.






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






8. A function is invoked with a ________.






9. Executable version of program






10. A function ________ enables a single function to be defined to perform a task on many different data types.






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






12. Whole numbers - no decimals and no commas included






13. Most calculations are normally performed by ______ statements.






14. In inheritance the ____________ is the class that supplies the inherited members.






15. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






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






18. * / % + -






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






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






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






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






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






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






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






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






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






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






29. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






30. Keyword public is a(n) _________






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






32. A sequence of operands and operators that describe a calculation to be performed






33. A filestream variable that represents the default input source






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






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






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






37. Used for dynamically allocated variables






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






39. = & | are examples of ____________.






40. Syntax for named constant declaration






41. The symbol for the binary scope resolution operator






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






43. tab






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






45. The stream insertion operator






46. An expression that has operands with different data types






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






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






49. When a value of one data type is implicitly (automatically) changed to another data type






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