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. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






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






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. Member objects are constructed __________ their enclosing class object.






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






6. Preprocessor directive syntax






7. A variable that is known only within the function in which it is defined is called a ________.






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






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






10. Executable version of program






11. The stream extraction operator






12. Lists and tables of values can be stored in arrays or __________.






13. The sign you use for pointers






14. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.






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






16. Header file that contains commonly performed mathematical functions






17. Used for function calls and local variables






18. The sign you use for references






19. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






21. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






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






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






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






26. Operator with only one operand






27. Used for dynamically allocated variables






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






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






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






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






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






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






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






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






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






37. Whole numbers - no decimals and no commas included






38. A member function should be declared static if it does not access __________ class members.






39. tab






40. The stream insertion operator






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






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






43. A function that calls itself






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






45. data types that refer to numbers with decimals






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






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






48. A function is invoked with a ________.






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






50. Used to qualify hidden names so that they can be used.