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 stream insertion operator






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






3. A filestream variable that represents the default output device






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






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






6. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






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






9. Operator with only one operand






10. A function is invoked with a ________.






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






12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






13. = & | are examples of ____________.






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






15. To write data to a file you define an object of which one of the following






16. Sets floating-point values to a fixed decimal format






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






18. data types that refer to numbers with decimals






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






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






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






22. The sign you use for pointers






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






24. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






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






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






27. newline






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






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






30. All C++ Variables are_________.






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






32. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






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






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






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






36. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






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






38. Symbol that denotes an action to be performed






39. A function that calls itself






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






41. Header file that contains commonly performed mathematical functions






42. Executable version of program






43. An expression that has operands with different data types






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






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






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






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






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






49. tab






50. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.