logo

CuriousTab

CuriousTab

Discussion


Home Computer Science Object Oriented Programming Using C++ Comments

  • Question
  • 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

  • Correct Answer
  • you save many lines of code by not rewriting an identical structure definition in each function that uses it 


  • Object Oriented Programming Using C++ problems


    Search Results


    • 1. 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
    • 2. 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
    • 3. 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
    • 4. 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
    • 5. 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
    • Discuss
    • 6. Paying attention to the important properties while ignoring inessential details is known as________

    • Options
    • A. selectiveness
    • B. polymorphism
    • C. abstraction
    • D. summarizing
    • Discuss
    • 7. To use either an input or output file, the program must include the _____ header file

    • Options
    • A. filestream.h
    • B. fstream.h
    • C. instream.h
    • D. inoutstream.h
    • E. iostream.h
    • Discuss
    • 8. To expose a data member to the program, you must declare the data member in the _____ section of the class

    • Options
    • A. common
    • B. exposed
    • C. public
    • D. unrestricted
    • E. user
    • Discuss
    • 9. An array name is a _____

    • Options
    • A. subscript
    • B. formal parameter
    • C. memory address
    • D. prototype
    • Discuss
    • 10. Format flags may be combined using

    • Options
    • A. the bitwise OR operator (|)
    • B. the logical OR operator (||)
    • C. the bitwise AND operator (&)
    • D. the logical AND operator (&&)
    • Discuss


    Comments

    There are no comments.

Enter a new Comment