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 variable that is known only within the function in which it is defined is called a ________.






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






3. Default name of executable file






4. An expression that has operands with different data types






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






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






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






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






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






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






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






12. In inheritance the ____________ is the class the receives the inherited members.






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






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






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






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






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






18. A pointer is a variable that contains as its value the____________ of another variable.






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






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






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






22. Most calculations are normally performed by ______ statements.






23. Repeating a set of instructions a specific number of times is called_________repetition.






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






25. A function that can be used to read character data including whitespace






26. The idea that you can call the same function and the output will depend on the type of object you're using.






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






28. A filestream variable that represents the default input source






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






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






31. The symbol for the binary scope resolution operator






32. Function ________ is used to produce random numbers.






33. When a value of one data type is implicitly (automatically) changed to another data type






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






35. = & | are examples of ____________.






36. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.






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






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






39. Syntax for named constant declaration






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






41. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






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






43. Header file that contains commonly performed mathematical functions






44. A function that calls itself






45. * / % + -






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






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






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






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






50. A function is invoked with a ________.