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 ________ program executes before the compiler's translation phase begins.






2. Names of things that are used in a program - can apply to variables & constants and functions






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






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






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






6. Operator with two operands






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






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






9. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






10. The sign you use for references






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






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






13. A filestream variable that represents the default input source






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






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






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






17. newline






18. A function is invoked with a ________.






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






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






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






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






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






24. Executable version of program






25. Keyword public is a(n) _________






26. Used for dynamically allocated variables






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






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






29. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






30. A filestream variable that represents the default output device






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






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






33. The process of determining if an array contains a particular key value is called _________ the array.






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






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






36. Creates a copy of a string.






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






38. Most calculations are normally performed by ______ statements.






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






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






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






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






43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






44. Program components in C++ are called functions and ________.






45. Use 2 characters to represent one






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






47. For every opening brace in a C++ program there must be a ______________.






48. In inheritance the ____________ is the class that supplies the inherited members.






49. Header file that contains commonly performed mathematical functions






50. Function ________ is used to produce random numbers.