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. An expression in which all operands have the same data type - result will have the same data type as operands






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






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






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






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






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






7. Operator with only one operand






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






9. A function is invoked with a ________.






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






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






12. The _________ begins the body of every function and the _________ ends the body of every function.






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






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






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






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






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






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






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






20. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.






21. The ________ of an identifier is the portion of the program in which the identifier can be used.






22. The ________ program combines the output of the compiler with various library functions to produce an executable image.






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






24. Creates a copy of a string.






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






26. Whole numbers - no decimals and no commas included






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






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






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






30. Header file that contains commonly performed mathematical functions






31. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.






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






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






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






35. __________ can be used to assign an object of a class to another object of the same class.






36. Use 2 characters to represent one






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






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






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






40. A constant object must be __________; it cannot be modified after it is created.






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






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






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






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






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






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






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






48. A variable declared outside any block or function is a ________ variable.






49. Symbol that denotes an action to be performed






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