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. Names of things that are used in a program - can apply to variables & constants and functions






2. A constant object must be __________; it cannot be modified after it is created.






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






4. newline






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






6. The stream extraction operator






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






8. Compares two strings and returns 0 if they are equal.






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






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






11. A function is invoked with a ________.






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






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






14. Function ________ is used to produce random numbers.






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






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






17. Message displayed to the screen asking user for input; generated with an output statement






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






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






20. The storage-class specifiers are mutable - auto - ________ - extern and static.






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






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






23. int namespace include using return examples of ___________






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






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






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






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






28. All C++ Variables are_________.






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






30. data types that refer to numbers with decimals






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






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






33. Symbol that denotes an action to be performed






34. Used for dynamically allocated variables






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






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. Lists and tables of values can be stored in arrays or __________.






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






39. tab






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






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






42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






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






45. Repeating a set of instructions a specific number of times is called_________repetition.






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






47. * / % + -






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






49. Most calculations are normally performed by ______ statements.






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