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






2. Default name of executable file






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






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






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






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






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






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






9. Operator with only one operand






10. Message displayed to the screen asking user for input; generated with an output statement






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






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






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






14. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






16. Used for dynamically allocated variables






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






18. The stream extraction operator






19. = & | are examples of ____________.






20. The symbol for the binary scope resolution operator






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






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






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






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






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






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






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






28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






29. A function ________ enables a single function to be defined to perform a task on many different data types.






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






31. directive A statement that starts with a # is called a ____________.






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






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






34. Executable version of program






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






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






37. The ________ program transfers the executable image of a C++ program from disk to memory.






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






39. A filestream variable that represents the default input source






40. Used for function calls and local variables






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






42. When a value of one data type is implicitly (automatically) changed to another data type






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






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






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






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






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






48. Keyword public is a(n) _________






49. data types that refer to numbers with decimals






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