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. These are data items whose values do not change while the program is running






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






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






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






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






6. Preprocessor directive syntax






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






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






9. An operator that can only be used with int values. result will always be an int.






10. A function is invoked with a ________.






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






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






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






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






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






16. The stream extraction operator






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






18. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






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






21. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






23. Keyword public is a(n) _________






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






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






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






27. Type casting syntax






28. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






29. Forces the computer to display decimal point and trailing zeroes






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






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






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






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






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






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






36. The __________ operator reclaims memory previously allocated by new.






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






38. The sign you use for pointers






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






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






41. A function that calls itself






42. The storage-class specifiers are mutable - auto - ________ - extern and static.






43. int namespace include using return examples of ___________






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






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






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






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






48. newline






49. Used for function calls and local variables






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