Home / CSE / Object Oriented Programming Using C++ :: Section 5

CSE :: Object Oriented Programming Using C++

  1. Within a program, you can instantiate ________that have a class template type

  2. A.
    classes
    B.
    functions
    C.
    parameters
    D.
    objects

  3. The rules to any programming language are its _______

  4. A.
    syntax
    B.
    interpretation
    C.
    logic
    D.
    customs

  5. Which of the following backslash codes used for bell?

  6. A.
    \b
    B.
    a
    C.
    \r
    D.
    \s
    E.
    None of the above

  7. The last statement in a value-returning function is always _____

  8. A.
    };
    B.
    result expression;
    C.
    return;
    D.
    return expression;

  9. One of the logical operators in the C language is represented by the symbol

  10. A.
    AND
    B.
    &&
    C.
    >=
    D.
    <=
    E.
    None of the above

  11. Which of the following declares and initializes an Integer variable named numltems?

  12. A.
    int numltems = 0;
    B.
    int numltems = '0';
    C.
    integer numltems = 0;
    D.
    numltems int = 0;
    E.
    numltems integer = 0;

  13. Which of the following tells C++ to display numbers in fixed notation?

  14. A.
    setiosflags(fixed)
    B.
    setiosflags(fixed: :is)
    C.
    setiosflags(ios, fixed)
    D.
    setiosflags(ios::fixed)

  15. The #include instruction is called a

  16. A.
    direction
    B.
    directive
    C.
    merge instruction
    D.
    statement.

  17. Another drawback to returning an error code from a function is that any error code returned by the function

  18. A.
    must be of the same type as return type of the function
    B.
    must not be a character
    C.
    cannot be checked in a main() program
    D.
    can have multiple meanings

  19. Classes hold _____

  20. A.
    data
    B.
    methods
    C.
    both data and methods
    D.
    neither data nor methods