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. These are data items whose values do not change while the program is running






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






3. Function ________ is used to produce random numbers.






4. Symbol that denotes an action to be performed






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






6. Default name of executable file






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






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






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






10. Creates a copy of a string.






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






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






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






14. Used for function calls and local variables






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






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






17. A function that calls itself either directly or indirectly - through another function) - is a ________ function.






18. You must have a ___________ for every variable you intend to use in a program






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






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






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






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






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






24. The sign you use for references






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






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






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






28. A sequence of operands and operators that describe a calculation to be performed






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






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






31. The symbol for the binary scope resolution operator






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






33. Type casting syntax






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






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






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






37. Preprocessor directive syntax






38. The three ways to return control from a called function to a caller are ________ - return expression and encounter.






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






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






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






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






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






44. Executable version of program






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






46. Most calculations are normally performed by ______ statements.






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






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






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






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