in

OBJECT ORIENTED PROGRAMMING C++ QUIZ | CAN YOU PASS? | 2021

You’ll find questions about object-oriented programming languages C++ from basic to advance level. You’ll be asked a multiple-choice question with three or four options, and you’ve to choose one. This short Quiz will reveal your
Programming Knowledge. You’ll get to know about your results when you answer all the questions. Share your results with your friends and in the comment section below.

  • Question of

    Which of the following is a correct identifier in C++?

    • 7var_name
    • 7VARNAME
    • VAR_1234
    • $var_name
  • Question of

    Which of the following is called address operator?

    • *
    • &
    • _
    • %
  • Question of

    Which of the following escape sequence represents carriage return?

    • r
    • n
    • nr
    • c
  • Question of

    Which of the following is called insertion operator?

    • <<
    • >>
    • >
    • <
    • <
  • Question of

    A language which has the capability to generate new data types are called ____________________.

    • Overloaded
    • Encapsulated
    • Extensible
    • Reprehensible
  • Question of

    Wrapping data and its related functionality into a single entity is known as _________________.

    • Abstraction
    • Encapsulation
    • Polymorphism
    • Modularity
  • Question of

    Which of the following operator has left to right associativity?

    • Unary Operator
    • Logical Not
    • Array element access
    • addressof
  • Question of

    What is the size of a boolean variable in C++?

    • 1 bit
    • 1 byte
    • 4 bytes
    • 2 bytes
  • Question of

    Which of the following is C++ equivalent for scanf()?

    • cin
    • cout
    • print
    • input
  • Question of

    Which of the following is an exit-controlled loop?

    • for
    • while
    • do-while
    • all of the above
  • Question of

    What does a class in C++ holds?

    • data
    • functions
    • both data & functions
    • arrays
  • Question of

    Which of the following is a valid class declaration?

    • class A { int x; }
    • public class A { }
    • class B { }
    • object A { int x; } ;
  • Question of

    The data members and functions of a class in C++ are by default __________________.

    • protected
    • private
    • public
    • public and protected
  • Question of

    Constructors are used to ___________________.

    • initialize the objects
    • construct the data members
    • both initialize the objects & construct the data members
    • delete the objects
  • Question of

    Which category of data type a class belongs to?

    • Fundamental data type
    • Derived data type
    • User defined derived data type
    • Atomic data type
  • Question of

    Inline functions are avoided when

    • funtion contains static variables
    • funtion have recursive calls
    • function have loops
    • all of the above
  • Question of

    What is a copy constructor?

    • A constructor that allows a user to move data from one object to another
    • A constructor to initialize an object with the values of another object
    • A constructor to check the whether to objects are equal or not
    • A constructor to kill other copies of a given object
  • Question of

    How many parameters does a default constructor require?

    • 1
    • 0
    • 2
    • 3
  • Question of

    When destructors are called?

    • When a program ends
    • When a function ends
    • When a delete operator is used
    • All of the mentioned
  • Question of

    Which of the following is correct?

    • Destructors can be virtual
    • There can be more than one destructor in a class
    • Destructor definition starts with !
    • Destructor is used to initialize objects
  • Question of

    What is a binary operator?

    • Operator that performs its action on a single operand
    • Operator that performs its action on two operand
    • Operator that performs its action on three operand
    • Operator that performs its action on any number of operands
  • Question of

    Which is the correct example of a binary operator?

    • ++
    • Dereferencing operator (*)
    • +
  • Question of

    Which is called ternary operator?

    • ? :
    • &&
    • | | |
    • ===
  • Question of

    What is Inheritance in C++?

    • Wrapping of data into a single class
    • Deriving new classes from existing classes
    • Overloading of classes
    • Classes with same names
  • Question of

    How many specifiers are used to derive a class?

    • 1
    • 2
    • 3
    • 4

Report

Comments

Leave a Reply

Avatar

Your email address will not be published. Required fields are marked *

Loading…

0
Would You Rather

POLL: WOULD YOU RATHER | 15 HARDEST CHOICES EVER | PERSONALITY QUIZ | 2021

IoT

What is Internet Of Things (IoT) | A Complete Guide | 2021