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 human readable file that contains C++ program






2. * / % + -






3. Default name of executable file






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






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






6. The idea that you can call the same function and the output will depend on the type of object you're using.






7. To allow file access in a program you must #include this header file.






8. The stream insertion operator






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






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






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






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






13. The symbol for the binary scope resolution operator






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






15. Operator with only one operand






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






17. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






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






20. A variable declared outside any block or function is a ________ variable.






21. Use 2 characters to represent one






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






23. int namespace include using return examples of ___________






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






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






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






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






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






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






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






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






32. Preprocessor directive syntax






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






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






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






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






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






38. Executable version of program






39. Creates a copy of a string.






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






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






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






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






44. data types that refer to numbers with decimals






45. Keyword public is a(n) _________






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






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






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






49. A filestream variable that represents the default output device






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