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_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






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






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






4. The stream extraction operator






5. Identifier or expression that is part of the calculation to be performed






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






7. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call






8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time






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






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






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






12. Symbol that denotes an action to be performed






13. A filestream variable that represents the default output device






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






15. Executable version of program






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






17. Associate an identifier with a memory location






18. The size & shape & color and weight of an object are considered






19. * / % + -






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






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






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






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






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






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






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






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






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






29. = & | are examples of ____________.






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






31. A function is invoked with a ________.






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






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






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






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






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






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






38. Preprocessor directive syntax






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






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






41. To allow file access in a program you must #include this header file.






42. newline






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






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






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






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






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






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






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






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