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. Operator with only one operand






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






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






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






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






6. The _____ causes the contents of another file to be inserted into a program.






7. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






8. Whole numbers - no decimals and no commas included






9. int namespace include using return examples of ___________






10. Smallest individual unit of a programming language - special symbols or word symbols or identifiers






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






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






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






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






15. All C++ Variables are_________.






16. Type casting syntax






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






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






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






20. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






21. Function ________ is used to produce random numbers.






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






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






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






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






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






27. To write data to a file you define an object of which one of the following






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






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






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






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






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






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






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






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






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






37. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.






38. Symbol that denotes an action to be performed






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






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






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






42. Syntax for named constant declaration






43. The only integer that can be assigned directly to a pointer is_____________.






44. * / % + -






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






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






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






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






49. Operator with two operands






50. = & | are examples of ____________.