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. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






3. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






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






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






7. Operator with only one operand






8. Default name of executable file






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






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






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






12. The ________ qualifier is used to declare read-only variables.






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






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






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






16. Operator with two operands






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






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






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






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






21. When a value of one data type is implicitly (automatically) changed to another data type






22. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.






23. The symbol for the binary scope resolution operator






24. Used for dynamically allocated variables






25. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






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






29. An operator that can only be used with int values. result will always be an int.






30. Use 2 characters to represent one






31. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .






32. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






34. Header file that contains commonly performed mathematical functions






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






36. A filestream variable that represents the default output device






37. * / % + -






38. The sign you use for pointers






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






40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






41. Most calculations are normally performed by ______ statements.






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






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






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






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






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






47. Creates a copy of a string.






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






49. A function is invoked with a ________.






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