logo

CuriousTab

CuriousTab

Discussion


Home Computer Science Object Oriented Programming Using C++ Comments

  • Question
  • To be called object-oriented, a programming language must allow


  • Options
  • A. functions that return only a single value
  • B. #include files
  • C. inheritance
  • D. All of the above

  • Correct Answer
  • inheritance 


  • Object Oriented Programming Using C++ problems


    Search Results


    • 1. The #ifndef directive tests to see whether ________

    • Options
    • A. a class has been defined
    • B. a variable has been given a value
    • C. a class has no variable definitions
    • D. any objects of the class have been instantiated
    • Discuss
    • 2. The _____ mode tells C++ to open a file for input

    • Options
    • A. add::ios
    • B. in::file
    • C. ios::app
    • D. ios::in
    • E. ios::out
    • Discuss
    • 3. A function that changes the state of the cout object is called a(n) _____

    • Options
    • A. member
    • B. adjuster
    • C. manipulator
    • D. operator
    • Discuss
    • 4. Using the wardrobe structure within the ShopList structure is an example of a good programming principle, known as _____

    • Options
    • A. reusability
    • B. polymorphism
    • C. redundancy
    • D. recursion
    • Discuss
    • 5. A default catch block catches

    • Options
    • A. all thrown objects
    • B. no thrown objects
    • C. any thrown object that has not been caught by an earlier catch block
    • D. all thrown objects that have been caught by an earlier catch block
    • Discuss
    • 6. When a child class function is called, the compiler looks first for a matching function name in the _____

    • Options
    • A. class of the object using the function name
    • B. immediate ancestor class
    • C. base class
    • D. descendant class
    • Discuss
    • 7. A widget is to the blueprint for a widget as an object is to

    • Options
    • A. a member function
    • B. a class
    • C. an operator
    • D. a data item
    • Discuss
    • 8. What does C++ append to the end of a string literal constant?

    • Options
    • A. a space
    • B. a number sign (#)
    • C. an asterisk (*)
    • D. a null character
    • Discuss
    • 9. The use of the break statement in a switch statement is

    • Options
    • A. optional
    • B. compulsory
    • C. not allowed. It gives an error message
    • D. to check an error
    • E. None of the above
    • Discuss
    • 10. You define a structure type globally because _____

    • Options
    • A. you save many lines of code by not rewriting an identical structure definition in each function that uses it
    • B. you will never change its definition
    • C. it is required in C++
    • D. All of the above
    • Discuss


    Comments

    There are no comments.

Enter a new Comment