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 pointer is a variable that contains as its value the____________ of another variable.






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






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






4. tab






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






6. A function is invoked with a ________.






7. C++ programs are normally typed into a computer using a(n) ________ program.






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






9. Most calculations are normally performed by ______ statements.






10. Used for function calls and local variables






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






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






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






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






15. Default name of executable file






16. Syntax for named constant declaration






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






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






19. * / % + -






20. The sign you use for pointers






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






22. Function ________ is used to produce random numbers.






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






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






25. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






26. These are data items whose values do not change while the program is running






27. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






28. Symbol that denotes an action to be performed






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






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






31. A human readable file that contains C++ program






32. An expression that has operands with different data types






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






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






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






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






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






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






39. Use 2 characters to represent one






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






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






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






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






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






45. A filestream variable that represents the default output device






46. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






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






49. A program that finds and attaches to your program the indicated libraries for compilation






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