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. To allow file access in a program you must #include this header file.






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






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






4. The _________ begins the body of every function and the _________ ends the body of every function.






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






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






7. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






8. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






10. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






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






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






13. A __________ should be used to declare the size of an array because it makes the program more scalable.






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






15. Creates a copy of a string.






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






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 three values that can be used to initialize a pointer are 0 - __________ and an address.






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






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






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






22. A function that can be used to read character data including whitespace






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






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






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






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






27. You can declare default values for a function in the ____________________.






28. Syntax for named constant declaration






29. Use 2 characters to represent one






30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






31. data types that refer to numbers with decimals






32. The _____ causes the contents of another file to be inserted into a program.






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






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






35. A function that calls itself






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






37. The stream insertion operator






38. Default name of executable file






39. A function is invoked with a ________.






40. The stream extraction operator






41. The sign you use for references






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






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






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






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






46. A file must be ________ before data can be written to or read from it.






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






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






49. The symbol for the binary scope resolution operator






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