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. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






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






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






5. A filestream variable that represents the default output device






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






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






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






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






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






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






12. int namespace include using return examples of ___________






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






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






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






16. tab






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






18. * / % + -






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






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






21. Nonexecutable statements that are included in a program to provide information about what the program does etc.






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






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






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






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






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






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






28. You can declare default values for a function in the ____________________.






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






30. Used for dynamically allocated variables






31. A memory location with a name and data type - its content may be changed during program execution






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






33. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.






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






35. Symbol that denotes an action to be performed






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






37. A function is invoked with a ________.






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






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






40. A variable declared outside any block or function is a ________ variable.






41. The sign you use for references






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






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






44. Header file that contains commonly performed mathematical functions






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






46. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.






47. A constant object must be __________; it cannot be modified after it is created.






48. Most calculations are normally performed by ______ statements.






49. A filestream variable that represents the default input source






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