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






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






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






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






5. A function that calls itself






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






7. Initializers __________ must be used to initialize constant members of a class.






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






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






10. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






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






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






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






14. Symbol that denotes an action to be performed






15. A filestream variable that represents the default output device






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






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






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






19. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






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






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






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






24. Operator with two operands






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






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






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






28. Allows the programmer to store a value in a variable






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






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






31. All C++ Variables are_________.






32. Most calculations are normally performed by ______ statements.






33. The stream insertion operator






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






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






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






37. Header file that contains commonly performed mathematical functions






38. The size & shape & color and weight of an object are considered






39. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






41. An expression that has operands with different data types






42. All ______ must be declared before they are used.






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






44. Default name of executable file






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






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






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






48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






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






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