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 storage-class specifiers are mutable - auto - ________ - extern and static.






2. Operator with two operands






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






4. Associate an identifier with a memory location






5. An array that uses two subscripts is referred to as a(n) _________ array.






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






7. To explicitly indicate that a value is to be converted to another type






8. A filestream variable that represents the default input source






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






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






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






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






13. To write data to a file you define an object of which one of the following






14. The __________ operator reclaims memory previously allocated by new.






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






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






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






18. The sign you use for references






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






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






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






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






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






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






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






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






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






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






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






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






31. The symbol for the binary scope resolution operator






32. Whole numbers - no decimals and no commas included






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






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






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






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






37. These are data items whose values do not change while the program is running






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






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






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






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






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






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






44. int namespace include using return examples of ___________






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






46. The stream insertion operator






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






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






49. A program that finds and attaches to your program the indicated libraries for compilation






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