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. This manipulator is used to establish a field width for the value immediately following it.






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






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






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






5. The ________ qualifier is used to declare read-only variables.






6. Used for function calls and local variables






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






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






9. * / % + -






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


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






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






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






14. Returns the length of a string excluding the null terminator.






15. In inheritance the ____________ is the class the receives the inherited members.






16. Use 2 characters to represent one






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






18. The stream insertion operator






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






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






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






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






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






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






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






26. The only integer that can be assigned directly to a pointer is_____________.






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






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






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






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






31. The sign you use for pointers






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






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






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






35. Default name of executable file






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






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






38. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






40. This is used to mark the end of a complete C++ programming statement.






41. A ________ program executes before the compiler's translation phase begins.






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






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






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






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






46. Executable version of program






47. An expression that has operands with different data types






48. Preprocessor directive syntax






49. tab






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