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. Class members specified as _________ are accessible anywhere an object of the class is in scope.






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






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






4. A memory location with a name and data type - its content may be changed during program execution






5. A function is invoked with a ________.






6. For every opening brace in a C++ program there must be a ______________.






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






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






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






10. newline






11. A filestream variable that represents the default output device






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






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






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






15. The sign you use for references






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






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






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






19. Syntax for named constant declaration






20. The stream extraction operator






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






22. Used for function calls and local variables






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






24. directive A statement that starts with a # is called a ____________.






25. Used to qualify hidden names so that they can be used.






26. = & | are examples of ____________.






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






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






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






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






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






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






33. The size & shape & color and weight of an object are considered






34. Default name of executable file






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






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






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






38. Keyword public is a(n) _________






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






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






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






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






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






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






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






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






47. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.






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






49. Type casting syntax






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