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. The stream insertion operator






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






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






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






5. A type of pointer that can point at objects of any data type.






6. The ________ of an identifier is the portion of the program in which the identifier can be used.






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






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






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






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






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






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






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






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






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






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






17. A variable that holds the address of another variable.






18. An expression that has operands with different data types






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






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






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






22. The address-of operator. it is used to assign pointers and to print the address of variables.






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






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






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






26. = & | are examples of ____________.






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






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






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






30. Use 2 characters to represent one






31. A set of values together with a set of operations






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






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






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






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






36. Returns the length of a string excluding the null terminator.






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






38. The only integer that can be assigned directly to a pointer is_____________.






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






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






41. A filestream variable that represents the default input source






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






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






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






45. Grammar rules of the language; compiler will try to identify and locate syntax errors






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






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






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






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






50. Syntax for named constant declaration