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 function that calls itself






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






3. Preprocessor directive syntax






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






5. The size & shape & color and weight of an object are considered






6. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






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






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






9. The sign you use for references






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






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






12. If a member initializer is not provided for a member object of a class the object's __________ is called.






13. Use 2 characters to represent one






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






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






16. Operator with two operands






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






18. Most calculations are normally performed by ______ statements.






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






20. * / % + -






21. Executable version of program






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






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






24. A filestream variable that represents the default output device






25. Forces the computer to display decimal point and trailing zeroes






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






27. = & | are examples of ____________.






28. A __________ should be used to declare the size of an array because it makes the program more scalable.






29. An expression that has operands with different data types






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






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






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






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






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






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






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






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






38. To write data to a file you define an object of which one of the following






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






40. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






41. The ________ program transfers the executable image of a C++ program from disk to memory.






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






43. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






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






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






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. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')






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






50. Header file that contains commonly performed mathematical functions