Home

Computer Science and IT MCQs

Introduction to Programming

Quiz # 1, MCQs





NOTE: Attempt all Questions to see the Result at the bottom of this page.



The Timer has started 10:00



  1. 1)

    A template function must have at least ---------- generic data type


    • A) Zero
    • B) One
    • C) Two
    • D) Three

  2. 2)

    Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?


    • A) Class-name operator +() ;
    • B) Class-name operator +(int) ;
    • C) Class-name operator ++() ;
    • D) Class-name operator ++(int) ;

  3. 3)

    Class is a user defined___________.


    • A) memory referee
    • B) data type
    • C) value
    • D) none of the given options.

  4. 4)

    Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?


    • A) new int(10) ;
    • B) new int[10] ;
    • C) int new(10) ;
    • D) int new[10];

  5. 5)

    A Pointer is a special variable that contain


    • A) Data values
    • B) Memory Address
    • C) Both data and values
    • D) None of the given option

  6. 6)

    Operator overloading can be performed through__________________.


    • A) Classes
    • B) Function
    • C) Operators
    • D) Reference

  7. 7)

    When a value is referred by a normal variable then it is known as,


    • A) Direct Reference
    • B) Indirect Reference
    • C) Partial Reference
    • D) Proper Reference

  8. 8)

    Which of the following is NOT a preprocessor directive?


    • A) #error
    • B) #define
    • C) #line
    • D) #ndefine

  9. 9)

    The stream objects cin and cout are included in which header file?


    • A) iostream.h
    • B) fstream.h
    • C) istream.h
    • D) ostream.h

  10. 10)

    Overloaded delete operator function takes the same parameter as an argument returned by new operator function


    • A) True
    • B) False