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






2. data types that refer to numbers with decimals






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






4. An operator that can only be used with int values. result will always be an int.






5. To explicitly indicate that a value is to be converted to another type






6. A function is invoked with a ________.






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






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






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






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






11. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.






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






13. The sign you use for pointers






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






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






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






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






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






19. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






20. Keyword public is a(n) _________






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






22. Executable version of program






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






24. Symbol that denotes an action to be performed






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






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






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






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






29. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






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






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






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






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






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






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






36. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






37. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.






38. The modulus operator (%) can be used only with __________.






39. The symbol for the binary scope resolution operator






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






41. Every C++ statement ends with a(n) _________.






42. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________






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






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






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






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






47. = & | are examples of ____________.






48. The storage-class specifiers are mutable - auto - ________ - extern and static.






49. A filestream variable that represents the default input source






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