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. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.






2. Function ________ is used to set the random number seed to randomize a program.






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






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






5. A file must be ________ before data can be written to or read from it.






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






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






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






9. The process of determining if an array contains a particular key value is called _________ the array.






10. newline






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






12. Used for function calls and local variables






13. All ______ must be declared before they are used.






14. Classes can have relationships with other classes. These relationships are called ________.






15. Preprocessor directive syntax






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






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






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






19. Associate an identifier with a memory location






20. int namespace include using return examples of ___________






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






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






23. The ________ statement in a called function passes the value of an expression back to the calling function.






24. Lists and tables of values can be stored in arrays or __________.






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






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






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






28. A function that calls itself






29. The stream insertion operator






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






31. Executable version of program






32. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution






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






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






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






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






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






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






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






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






41. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






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






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






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






45. Type casting syntax






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






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






48. The ________ enables access to a global variable with the same name as a variable in the current scope.






49. A filestream variable that represents the default input source






50. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.