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. To explicitly indicate that a value is to be converted to another type






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






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






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






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






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






7. A________ allows the compiler to check the number & types and order of the arguments passed to a function.






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






9. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.






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






12. newline






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






14. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.






15. Message displayed to the screen asking user for input; generated with an output statement






16. data types that refer to numbers with decimals






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






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






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






20. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.






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






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






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






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






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






26. __________ can be used to assign an object of a class to another object of the same class.






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






28. Naming convention for C++ programs






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






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






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






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






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






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






35. Type casting syntax






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






37. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.






38. A ________ program executes before the compiler's translation phase begins.






39. Function ________ is used to produce random numbers.






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






41. Symbol that denotes an action to be performed






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






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






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






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






47. Executable version of program






48. The symbol for the binary scope resolution operator






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






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