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. A sequence of operands and operators that describe a calculation to be performed






2. A function that calls itself






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






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






5. The ________ enables access to a global variable with the same name as a variable in the current scope.






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






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






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






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






10. Class members specified as _________ are accessible only to member functions of the class and friends of the class.






11. A filestream variable that represents the default output device






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






13. The sign you use for pointers






14. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.






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






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






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






18. A function is invoked with a ________.






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






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






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






22. Whole numbers - no decimals and no commas included






23. = & | are examples of ____________.






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






25. A memory location with a name and data type - its content may be changed during program execution






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






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






28. This manipulator is used to establish a field width for the value immediately following it.






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






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






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






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






33. The three values that can be used to initialize a pointer are 0 - __________ and an address.






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






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






36. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.






37. Default name of executable file






38. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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






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






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






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






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






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






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






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






48. Used for function calls and local variables






49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






50. Function ________ is used to produce random numbers.