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. All C++ Variables are_________.






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






3. newline






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






5. data types that refer to numbers with decimals






6. Used for function calls and local variables






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






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






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






10. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






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






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






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






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






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






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






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






18. Most calculations are normally performed by ______ statements.






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






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






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






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






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






24. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






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






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






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






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






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






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






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






34. The only integer that can be assigned directly to a pointer is_____________.






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






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






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






38. Function ________ is used to produce random numbers.






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






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






41. Type casting syntax






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






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






44. The process of determining if an array contains a particular key value is called _________ the array.






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






46. The stream extraction operator






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






48. * / % + -






49. Operator with two operands






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