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 ________ statement in a called function passes the value of an expression back to the calling function.






2. Compares two strings and returns 0 if they are equal.






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






4. A filestream variable that represents the default output device






5. A set of values together with a set of operations






6. * / % + -






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






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






9. Executable version of program






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






11. = & | are examples of ____________.






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






13. An expression that has operands with different data types






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






15. Header file that contains commonly performed mathematical functions






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






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






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






19. newline






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






21. Default name of executable file






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






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






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






25. The symbol for the binary scope resolution operator






26. Associate an identifier with a memory location






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






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






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






30. Most calculations are normally performed by ______ statements.






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






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






33. Returns the length of a string excluding the null terminator.






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






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






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






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






38. Symbol that denotes an action to be performed






39. Whole numbers - no decimals and no commas included






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






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






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






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






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






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






46. Naming convention for C++ programs






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






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






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






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