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 file must be ________ before data can be written to or read from it.






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






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






4. tab






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






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






7. Whole numbers - no decimals and no commas included






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






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


10. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






11. The stream insertion operator






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






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






14. Used for dynamically allocated variables






15. This manipulator causes the field to be left-justified with padding spaces printed to the right.






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






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






18. Header file that contains commonly performed mathematical functions






19. An expression that has operands with different data types






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






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






22. A filestream variable that represents the default input source






23. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






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






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






26. data types that refer to numbers with decimals






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






28. An expression in which all operands have the same data type - result will have the same data type as operands






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






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






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






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. Names of things that are used in a program - can apply to variables & constants and functions






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






35. Syntax for named constant declaration






36. Use 2 characters to represent one






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






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






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. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






41. Associate an identifier with a memory location






42. Initializers __________ must be used to initialize constant members of a class.






43. A C++ statement that makes a decision is ______.






44. Symbol that denotes an action to be performed






45. A function that calls itself






46. A __________ data member represents class-wide information.






47. Default name of executable file






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






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






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