Cpp Quiz interview questions – page 3

118 questions. Tap “Show answer” to check yourself.

Advertisement
  1. The special characters like tab, backspace, line feed, null, back slash are called ____ character constant

    1. Floating
    2. String
    3. Graphic
    4. Non-graphic
    Show answer

    D. Non-graphic

  2. What type of integer starts with 0X?

    1. Decimal
    2. Binary
    3. Hexadecimal
    4. Octal
    Show answer

    C. Hexadecimal

  3. The sequence of digits starting with 0 is treated as ___ constant.

    1. Penta
    2. Hexadecimal
    3. Binary
    4. Octal
    Show answer

    D. Octal

  4. The body of function contains ___

    1. Return statement
    2. A variable declaration part
    3. Processing part
    4. All the above
    Show answer

    D. All the above

  5. Which of the following is not a C++ keyword?

    1. This
    2. New
    3. Cont
    4. If
    Show answer

    C. Cont

  6. ____ is a variable that holds a memory address.

    1. Long double
    2. Float
    3. Char
    4. Pointer
    Show answer

    D. Pointer

  7. Addressing is done using ___ number system.

    1. Decimal
    2. Hexadecimal
    3. Octal
    4. Binary
    Show answer

    B. Hexadecimal

  8. Which one of the following is a membership operator?

    1. !
    2. &
    3. ::
    4. .
    Show answer

    C. ::

  9. ____ Operator requires two operands.

    1. Logical
    2. Binary
    3. Unary
    4. Ternary
    Show answer

    B. Binary

  10. Additive, Multiplicative, shift, Bitwise logical and assignment operators is ____ operator.

    1. Conditional
    2. Relational
    3. Unary
    4. Binary
    Show answer

    D. Binary

  11. Binary plus (+) and Binary minus (-) are ___ operator.

    1. Additive
    2. Multiplicative
    3. Shift
    4. Bitwise
    Show answer

    A. Additive

  12. What is the length of double data type?

    1. 8
    2. 16
    3. 32
    4. 64
    Show answer

    D. 64

  13. Advertisement
  14. Which operator requires three operands?

    1. Unary
    2. Binary
    3. Ternary
    4. Bitwise
    Show answer

    D. Bitwise

  15. What are bitwise operators?

    1. &
    2. !
    3. ^
    4. All (a, b and c)
    Show answer

    D. All (a, b and c)

  16. Auto variables get undefined values known as ___

    1. Garbage
    2. Auto
    3. Register
    4. Static
    Show answer

    A. Garbage

  17. ____ storage class variables are defined in another program.

    1. Register
    2. Auto
    3. Extern
    4. Static
    Show answer

    C. Extern

  18. ____ Type is used to declare a generic pointer in C++.

    1. Int
    2. Void
    3. Static
    4. Float
    Show answer

    B. Void

  19. Which is a conditional operator?

    1. @
    2. >
    3. <
    4. ?:
    Show answer

    D. ?:

  20. Built in Data type is also called as ___ data type.

    1. Fundamental
    2. Secondary
    3. Void
    4. Integer
    Show answer

    A. Fundamental

  21. The constant that should not have fractional part is ___

    1. Float
    2. Double
    3. Integer
    4. Exponent
    Show answer

    C. Integer

  22. What is the other name for variable?

    1. While
    2. Visual
    3. Identifier
    4. Constant
    Show answer

    C. Identifier

  23. ____ constant is a signed real number.

    1. Char
    2. String
    3. Integer
    4. Floating point
    Show answer

    D. Floating point

  24. ___  type is further divided into int and char.

    1. Float
    2. Int
    3. Char
    4. Integral
    Show answer

    D. Integral

  25. The enum, unsigned int, short int and int data type’s uses ___ bits.

    1. 8
    2. 16
    3. 32
    4. 64
    Show answer

    B. 16

  26. Advertisement
  27. Where a condition is checked to see whether to do one or more iteration is _____

    1. Definite iteration
    2. Sequencing
    3. Indefinite iteration
    4. None of these
    Show answer

    B. Sequencing

  28. Which one is the valid real constant?

    1. 85.46
    2. 85
    3. 0.85
    4. Both a and c
    Show answer

    D. Both a and c

  29. ______ variables are sensitive to the data type they point to.

    1. Char
    2. Pointer
    3. Integer
    4. Float
    Show answer

    B. Pointer

  30. For example class boy, ____ is a user defined data type of class.

    1. Class
    2. Type
    3. Boy
    4. User
    Show answer

    C. Boy

  31. When a=6, c= ++a what will be the value of c?

    1. 6
    2. 7
    3. 8
    4. 9
    Show answer

    B. 7

  32. ____ class is another qualifier that can be added to a variable declaration.

    1. Register
    2. Static
    3. Sub
    4. Storage
    Show answer

    D. Storage

Advertisement