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. To write data to a file you define an object of which one of the following






2. int namespace include using return examples of ___________






3. A filestream variable that represents the default input source






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






5. Preprocessor directive syntax






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






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






8. Symbol that denotes an action to be performed






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






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






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






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






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






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






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






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






17. The sign you use for references






18. A pointer is a variable that contains as its value the____________ of another variable.






19. Function ________ is used to produce random numbers.






20. This manipulator causes the field to be left-justified with padding spaces printed to the right.






21. A __________ data member represents class-wide information.






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






23. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line

Warning: Invalid argument supplied for foreach() in /var/www/html/basicversity.com/show_quiz.php on line 183


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






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






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






27. Operator with two operands






28. A type of pointer that can point at objects of any data type.






29. A function is invoked with a ________.






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






31. The stream insertion operator






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






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






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






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






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






37. Characters used to separate symbols or reserved words or identifiers and statements






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






39. Most calculations are normally performed by ______ statements.






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






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






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






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






44. A filestream variable that represents the default output device






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






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






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






48. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






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