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 function that calls itself either directly or indirectly - through another function) - is a ________ function.






2. Keyword public is a(n) _________






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






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






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






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






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






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






9. newline






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






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






12. An expression that has operands with different data types






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






14. The __________ operator reclaims memory previously allocated by new.






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






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






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






18. Header file that contains commonly performed mathematical functions






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






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






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






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






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






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






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






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






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






28. data types that refer to numbers with decimals






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






30. The elements of an array are related by the fact that they have the same name and ___________.






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






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






33. The ________ qualifier is used to declare read-only variables.






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






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






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






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. To explicitly indicate that a value is to be converted to another type






39. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






40. A filestream variable that represents the default output device






41. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






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






44. A function is invoked with a ________.






45. A function that calls itself






46. Words that are used for special purposes in a program






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






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






49. C++ programs are normally typed into a computer using a(n) ________ program.






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