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 either directly or indirectly - through another function) - is a ________ function.






2. Used for function calls and local variables






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






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






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






6. Syntax for named constant declaration






7. int namespace include using return examples of ___________






8. The ________ qualifier is used to declare read-only variables.






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






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






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






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






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






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






15. Symbol that denotes an action to be performed






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






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






18. Keyword public is a(n) _________






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






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






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






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






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






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






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






26. Associate an identifier with a memory location






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






28. Two slash marks ( // ) indicate __________ of a comment






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






30. Every C++ program begins execution at the function _________.






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






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






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






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






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






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






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






38. Type casting syntax






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






40. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






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






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






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






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






46. * / % + -






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






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






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






50. Operator with only one operand