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. In inheritance the ____________ is the class the receives the inherited members.






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






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






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






5. The sign you use for pointers






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






7. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






9. A memory location with a name and data type - its content may be changed during program execution






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






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






12. A function that calls itself






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






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






15. Preprocessor directive syntax






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






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






18. Keyword public is a(n) _________






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






20. Every C++ statement ends with a(n) _________.






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






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






23. An operator that can only be used with int values. result will always be an int.






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






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






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






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






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






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






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






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






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






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






35. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






36. The ________ statement in a called function passes the value of an expression back to the calling function.






37. Used for dynamically allocated variables






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






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


40. Function ________ is used to set the random number seed to randomize a program.






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






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






43. All C++ Variables are_________.






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






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






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






47. Default name of executable file






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






49. __________ can be used to assign an object of a class to another object of the same class.






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