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. Function ________ is used to produce random numbers.






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






3. This manipulator is used to establish a field width for the value immediately following it.






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






5. A variable that holds the address of another variable.






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






7. Most calculations are normally performed by ______ statements.






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






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






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






11. Characters used to separate symbols or reserved words or identifiers and statements






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


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






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






15. Use 2 characters to represent one






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






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






18. A filestream variable that represents the default input source






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






20. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






22. Creates a copy of a string.






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






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






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






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






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






28. newline






29. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






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






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






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






34. * / % + -






35. Preprocessor directive syntax






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






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






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






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






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






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






42. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






44. An expression that has operands with different data types






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






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






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






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






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






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