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. Initializers __________ must be used to initialize constant members of a class.






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






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






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






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






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






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






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






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






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






11. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






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






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






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






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






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






18. Whole numbers - no decimals and no commas included






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






20. Keyword public is a(n) _________






21. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






22. Use 2 characters to represent one






23. Type casting syntax






24. A function is invoked with a ________.






25. To explicitly indicate that a value is to be converted to another type






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






27. Creates a copy of a string.






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






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






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






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






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






33. All C++ Variables are_________.






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






35. A filestream variable that represents the default output device






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






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






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






39. Used to qualify hidden names so that they can be used.






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






41. Characters used to separate symbols or reserved words or identifiers and statements






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






43. Associate an identifier with a memory location






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






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






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






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






48. = & | are examples of ____________.






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






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