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. Naming convention for C++ programs






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






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






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






5. Executable version of program






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






7. A function is invoked with a ________.






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






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






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






11. Symbol that denotes an action to be performed






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






13. Every C++ program begins execution at the function _________.






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






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






16. C++ programs are normally typed into a computer using a(n) ________ program.






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






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






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






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






21. The process of placing the elements of an array in order is called ________ the array.






22. Header file that contains commonly performed mathematical functions






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






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






25. Associate an identifier with a memory location






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






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






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






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






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






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






32. Operator with only one operand






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






34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






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






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






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






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






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






40. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






43. Keyword public is a(n) _________






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






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






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






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






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






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






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