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 nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






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






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






4. All C++ Variables are_________.






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






6. Preprocessor directive syntax






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






8. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






11. Default name of executable file






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






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






14. Syntax for named constant declaration






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






16. directive A statement that starts with a # is called a ____________.






17. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






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






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


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






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






24. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






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






29. A filestream variable that represents the default input source






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






31. Symbol that denotes an action to be performed






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






33. A human readable file that contains C++ program






34. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






35. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






36. newline






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






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






39. A function is invoked with a ________.






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






41. Compares two strings and returns 0 if they are equal.






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






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






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






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






46. An expression that has operands with different data types






47. The symbol for the binary scope resolution operator






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






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






50. tab