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 set of values together with a set of operations






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






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






4. Header file that contains commonly performed mathematical functions






5. The process of placing the elements of an array in order is called ________ the array.






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






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






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






9. A filestream variable that represents the default output device






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






11. data types that refer to numbers with decimals






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






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






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






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






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






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






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






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






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






21. Creates a copy of a string.






22. Keyword public is a(n) _________






23. Function ________ is used to produce random numbers.






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






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






26. Type casting syntax






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






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






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






30. A member function should be declared static if it does not access __________ class members.






31. Used for dynamically allocated variables






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






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






34. The number used to refer to a particular element of an array is called its ________.






35. tab






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






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






38. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






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






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






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






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






45. Whole numbers - no decimals and no commas included






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






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






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






49. Associate an identifier with a memory location






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