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. Whole numbers - no decimals and no commas included






2. A filestream variable that represents the default input source






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






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






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






6. Used for dynamically allocated variables






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






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






9. Creates a copy of a string.






10. An expression that has operands with different data types






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






12. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.






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






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






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






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






17. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.






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






19. This manipulator causes the field to be left-justified with padding spaces printed to the right.






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






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






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






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






24. The _________ begins the body of every function and the _________ ends the body of every function.






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






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






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






28. Every C++ statement ends with a(n) _________.






29. Type casting syntax






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






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






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






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






34. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors






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






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






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






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






39. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.






40. Characters used to separate symbols or reserved words or identifiers and statements






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






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






43. Used to qualify hidden names so that they can be used.






44. The stream insertion operator






45. The stream extraction operator






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






47. A __________ data member represents class-wide information.






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






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






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