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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.






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






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






4. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.






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






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






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






8. The process of determining if an array contains a particular key value is called _________ the array.






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






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






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






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






13. Whole numbers - no decimals and no commas included






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






15. Operator with two operands






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






17. Syntax for named constant declaration






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






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






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






21. Used for function calls and local variables






22. A filestream variable that represents the default output device






23. Naming convention for C++ programs






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






25. The stream insertion operator






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






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






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






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






30. A filestream variable that represents the default input source






31. Keyword public is a(n) _________






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






33. The ________ statement in a called function passes the value of an expression back to the calling function.






34. Operator with only one operand






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






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






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






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






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






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






41. Symbol that denotes an action to be performed






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






43. The symbol for the binary scope resolution operator






44. tab






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






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






47. All C++ Variables are_________.






48. Used for dynamically allocated variables






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






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