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. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






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






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






5. Executable version of program






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






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






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






9. An expression that has operands with different data types






10. Keyword public is a(n) _________






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






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






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






14. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






15. Associate an identifier with a memory location






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






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






18. Use 2 characters to represent one






19. The sign you use for pointers






20. The sign you use for references






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






22. int namespace include using return examples of ___________






23. You must have a ___________ for every variable you intend to use in a program






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






25. All ______ must be declared before they are used.






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






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






28. A function that calls itself






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






30. The symbol for the binary scope resolution operator






31. A function is invoked with a ________.






32. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






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






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






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






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






37. Used for function calls and local variables






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






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






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






41. newline






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






43. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






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






45. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






47. Function ________ is used to produce random numbers.






48. Creates a copy of a string.






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






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