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. This manipulator is used to establish a field width for the value immediately following it.






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






3. The sign you use for references






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






5. tab






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






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






8. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.






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






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






11. The symbol for the binary scope resolution operator






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






13. = & | are examples of ____________.






14. An expression that has operands with different data types






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






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






17. The sign you use for pointers






18. Used for dynamically allocated variables






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






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






21. A member function should be declared static if it does not access __________ class members.






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






23. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






25. Syntax for named constant declaration






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






27. A sequence of operands and operators that describe a calculation to be performed






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






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






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






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






32. Default name of executable file






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






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






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






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






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. A set of values together with a set of operations






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






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






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






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






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






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






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






46. Associate an identifier with a memory location






47. A filestream variable that represents the default output device






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






49. A program that finds and attaches to your program the indicated libraries for compilation






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