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. Use 2 characters to represent one






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






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






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






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






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






7. The __________ operator reclaims memory previously allocated by new.






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






9. A filestream variable that represents the default output device






10. int namespace include using return examples of ___________






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






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






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






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






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






16. Syntax for named constant declaration






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






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






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






20. In inheritance the ____________ is the class the receives the inherited members.






21. The sign you use for references






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






23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.






24. The process of placing the elements of an array in order is called ________ the array.






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






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






27. tab






28. = & | are examples of ____________.






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






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






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






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






33. data types that refer to numbers with decimals






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






35. Whole numbers - no decimals and no commas included






36. Header file that contains commonly performed mathematical functions






37. A function is invoked with a ________.






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






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






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






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






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






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






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






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






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






47. An expression that has operands with different data types






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






49. A filestream variable that represents the default input source






50. Most calculations are normally performed by ______ statements.