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






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






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






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






5. Associate an identifier with a memory location






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






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






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






9. Classes can have relationships with other classes. These relationships are called ________.






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






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






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






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






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






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






16. = & | are examples of ____________.






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






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






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






20. Used for function calls and local variables






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






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






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






24. Keyword public is a(n) _________






25. A filestream variable that represents the default input source






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






27. All C++ Variables are_________.






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






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






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






31. Type casting syntax






32. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






33. Used for dynamically allocated variables






34. Operator with only one operand






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






36. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






37. The stream extraction operator






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






39. An expression that has operands with different data types






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






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






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






43. Symbol that denotes an action to be performed






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






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






46. int namespace include using return examples of ___________






47. Operator with two operands






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






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






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