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. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






4. Member objects are constructed __________ their enclosing class object.






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






6. Class members specified as _________ are accessible anywhere an object of the class is in scope.






7. Type casting syntax






8. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.






9. tab






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






11. The sign you use for references






12. The modulus operator (%) can be used only with __________.






13. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






14. The __________ operator reclaims memory previously allocated by new.






15. Used for function calls and local variables






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






17. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






18. The stream insertion operator






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






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






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






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






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






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






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






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






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






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






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






30. The _____ causes the contents of another file to be inserted into a program.






31. data types that refer to numbers with decimals






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






33. Characters used to separate symbols or reserved words or identifiers and statements






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






35. A function that calls itself






36. Most calculations are normally performed by ______ statements.






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






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






39. A function is invoked with a ________.






40. = & | are examples of ____________.






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






42. The sign you use for pointers






43. A __________ data member represents class-wide information.






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






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






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






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






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






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






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