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. The storage-class specifiers are mutable - auto - ________ - extern and static.






2. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






3. A filestream variable that represents the default input source






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






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






6. A member function should be declared static if it does not access __________ class members.






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






8. The _____ causes the contents of another file to be inserted into a program.






9. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






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






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






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






15. Used for function calls and local variables






16. The address-of operator. it is used to assign pointers and to print the address of variables.






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






18. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






19. Every C++ program begins execution at the function _________.






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






21. A function that calls itself






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






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






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






25. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






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






29. The sign you use for references






30. * / % + -






31. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






32. An expression that has operands with different data types






33. The symbol for the binary scope resolution operator






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






35. To allow file access in a program you must #include this header file.






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






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






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






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






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






41. Keyword public is a(n) _________






42. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






44. Preprocessor directive syntax






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






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






47. Most calculations are normally performed by ______ statements.






48. tab






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






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