C++ Programming Exam Quiz! Trivia

49 Questions | Total Attempts: 4749

SettingsSettingsSettings
Please wait...
C++ Programming Exam Quiz! Trivia

.


Questions and Answers
  • 1. 
    The notation of logical NOT operator in a C++ program is
    • A. 

      :

    • B. 

      ;

    • C. 

      None of the Above

    • D. 

      !

  • 2. 
    • A. 

      No default constructor is provided by the compiler

    • B. 

      The compiler provides the default constructor

    • C. 

      The compiler generates error

    • D. 

      None of the Above

  • 3. 
    The notation of ternary operator is
    • A. 

      &

    • B. 

      ?:

    • C. 

      ~

    • D. 

      %

  • 4. 
    When the object of the first class is instantiated then which of the following is called?
    • A. 

      Destructor

    • B. 

      Constructor

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 5. 
    Which of the following denotes the C++ looping statement?
    • A. 

      Do-while

    • B. 

      For

    • C. 

      Both A and B

  • 6. 
    Which of the following can be used to initialize a newly declared variable from an existing variable?
    • A. 

      Virtual Function

    • B. 

      Namespaces

    • C. 

      Copy constructor

    • D. 

      None of the Above

  • 7. 
    A template can be instantiated by
    • A. 

      Explicit Instantiation

    • B. 

      Implicit instantiation

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 8. 
    The header file that must be included while using cout function in a C++ program is
    • A. 

      Conio.h

    • B. 

      Math.h

    • C. 

      Iostream.h

    • D. 

      None of the Above

  • 9. 
    Using pointers to call a function is called as
    • A. 

      Call by value

    • B. 

      Call by reference

    • C. 

      Call by address

    • D. 

      All the Above

  • 10. 
    What is the minimum number of times a do loop would definitely get executed?
    • A. 

      0

    • B. 

      1

    • C. 

      Infinity

    • D. 

      Could not be predicted

  • 11. 
    Strict parameter type checking is followed by which of these?
    • A. 

      Inline

    • B. 

      Macros

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 12. 
    The variables that can be used only within the function in which it is declared is called as
    • A. 

      Global Variables

    • B. 

      Local Variables

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 13. 
    How many values can be returned by a C++ function?
    • A. 

      1

    • B. 

      Infinity

    • C. 

      0

    • D. 

      None of the Above

  • 14. 
    If a function in C++ does not return a value then its return type is denoted as
    • A. 

      Float

    • B. 

      Void

    • C. 

      Int

    • D. 

      None of the Above

  • 15. 
    The variables that are used to represent individual array element in an array is called as
    • A. 

      Pointer Variable

    • B. 

      Subscripted variable

    • C. 

      Index Variable

    • D. 

      Real Variable

  • 16. 
    The array exforsys[10] can be declared using pointers as
    • A. 

      % exforsys[]

    • B. 

      & exforsys[]

    • C. 

      * exforsys[]

    • D. 

      @ exforsys[]

  • 17. 
    What is the notation used to place block of statements in a looping structure in C++?
    • A. 

      % %

    • B. 

      ( )

    • C. 

      { }

    • D. 

      None of the Above

  • 18. 
    Index of an array starts from
    • A. 

      One

    • B. 

      Zero

    • C. 

      Two

    • D. 

      None of the Above

  • 19. 
    The variable that contains address of another variable is called as
    • A. 

      Pointer

    • B. 

      Arrays

    • C. 

      Unions

    • D. 

      None of the Above

  • 20. 
    When dynamically allocated memory is lost to the C++ program then
    • A. 

      Warning occurs

    • B. 

      Memory leak occurs

    • C. 

      The program executes successfully

    • D. 

      None of the above

  • 21. 
    The operator that denotes address of a variable in C++ program is
    • A. 

      *

    • B. 

      %

    • C. 

      $

    • D. 

      &

  • 22. 
    A function named as exforsys has three implementations associated with it. This means the function exforsys is
    • A. 

      Overloaded

    • B. 

      Overriding

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 23. 
    The notation of member access operator in structures is
    • A. 

      &

    • B. 

      .

    • C. 

      $

    • D. 

      *

  • 24. 
    One argument constructor is also called as
    • A. 

      Single constructor

    • B. 

      Copy constructor

    • C. 

      Both A and B

    • D. 

      None of the Above

  • 25. 
    The other name for external variables in C++ is
    • A. 

      Static variables

    • B. 

      Register variables

    • C. 

      Global variables

    • D. 

      None of the Above