Cpp Quiz interview questions – page 4

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

Advertisement
  1. ____ storage class global variable known to all functions in the current program.

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

    B. Extern

  2. The address number starts at ___

    1. 1
    2. 2
    3. 3
    4. Null
    Show answer

    D. Null

  3. _____ are the kind of data that variables hold in a programming language.

    1. Conditional type
    2. Constant type
    3. Variable type
    4. Data types
    Show answer

    D. Data types

  4. The operands and the operators are grouped in a specific logical way of evaluation is called ____

    1. Assignment
    2. Association
    3. Arithmetic
    4. Class
    Show answer

    B. Association

  5. Rick Mascitti coined the name ___

    1. Visual BASIC
    2. COBOL
    3. C++
    4. BASIC
    Show answer

    C. C++

  6. ____ is a sequence of characters surrounded by double quotes.

    1. Constant
    2. Numeric
    3. Character
    4. String literal
    Show answer

    D. String literal

  7. How many fundamental data types are there in C++?

    1. 1
    2. 2
    3. 3
    4. 4
    Show answer

    C. 3

  8. ____ is an operator which returns the memory size requirements in terms of bytes.

    1. Double
    2. Size
    3. Size of
    4. Long
    Show answer

    C. Size of

  9. What are shift operators?

    1. << 
    2. >> 
    3. > 
    4. Both (a) and (b)
    Show answer

    D. Both (a) and (b)

  10. _____ variable of the same data type can be declared in a single declaration statement.

    1. Two
    2. Three
    3. Only one
    4. More than one
    Show answer

    D. More than one

  11. Which one gives special meaning to the language compiler?

    1. Constant
    2. Variable
    3. Keywords
    4. Compiler
    Show answer

    C. Keywords

  12. Which operator requires one operand?

    1. Unary
    2. Binary
    3. Ternary
    4. Both (a) and (b)
    Show answer

    A. Unary

  13. Advertisement
  14. ___ data type to indicate the function does not return a value.

    1. Static
    2. Main
    3. Public
    4. Void
    Show answer

    C. Public

  15. C++ was developed by ___

    1. Thomas Kushz
    2. John Kemney
    3. Bjarne Stroutstrup
    4. James Goling
    Show answer

    C. Bjarne Stroutstrup

  16. Which one of the following is a keyword?

    1. Size
    2. Key
    3. Jump
    4. Switch
    Show answer

    D. Switch

  17. ____ is the smallest individual unit in a program.

    1. Variable
    2. Control
    3. Character
    4. Token
    Show answer

    D. Token

  18. What is a constant that contains a single character enclosed within single quotes?

    1. Character
    2. Numeric
    3. Fixed
    4. Floating point
    Show answer

    A. Character

  19. The modulus operator uses ___ character.

    1. +
    2. *
    3. /
    4. %
    Show answer

    D. %

  20. Every variable should be separated by ___ separator.

    1. Dot
    2. Colon
    3. Comma
    4. Semicolon
    Show answer

    C. Comma

  21. Auto, static, extern and register are called as ___

    1. Static
    2. Register
    3. Auto
    4. Storage specifier
    Show answer

    D. Storage specifier

  22. How many storage specifies are there in a C++?

    1. 2
    2. 3
    3. 4
    4. 5
    Show answer

    C. 4

  23. Signed, unsigned, long and short are some of the ___

    1. Void
    2. Data
    3. Derived data
    4. Modifiers
    Show answer

    D. Modifiers

  24. Logical AND (&amp;&amp;) and Logical OR (||) are ___ operators.

    1. Logical
    2. Equality
    3. Class member
    4. Comma
    Show answer

    A. Logical

  25. ____ operators have lower precedence to relational and arithmetic operators.

    1. Conditional
    2. Boolean
    3. Logical
    4. Relational
    Show answer

    D. Relational

  26. Advertisement
  27. How many C++ data types are broadly classified?

    1. 2
    2. 3
    3. 4
    4. 5
    Show answer

    B. 3

  28. Float and double are related to ____ data type.

    1. Void
    2. Floating
    3. Fixed
    4. Integral
    Show answer

    B. Floating

  29. Variable names must begin with ___

    1. #
    2. $
    3. Number
    4. Letter
    Show answer

    D. Letter

  30. Integer values are stored in ___ bit format in binary form.

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

    B. 16

Advertisement