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. Member objects are constructed __________ their enclosing class object.






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






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. Used for dynamically allocated variables






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






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






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






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






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






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






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






12. Whole numbers - no decimals and no commas included






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






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






15. The only integer that can be assigned directly to a pointer is_____________.






16. Operator with only one operand






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






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






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






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






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






22. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.






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






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






25. The symbol for the binary scope resolution operator






26. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.






27. data types that refer to numbers with decimals






28. A function that calls itself






29. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.






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






31. * / % + -






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






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






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






35. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.






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






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






38. The process of analyzing and designing a system from an object-oriented point of view is called ________.






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






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






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






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






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






44. = & | are examples of ____________.






45. An expression that has operands with different data types






46. A C++ statement that makes a decision is ______.






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






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






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






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