Object Oriented Programming (Mid Examination)

11 Questions | Total Attempts: 128

SettingsSettingsSettings
Please wait...
Object Oriented Programming Quizzes & Trivia

In the Information Technology world, programming is very essential to the outcome of almost every result. Object oriented programming is a type, which is widely used across board. The quiz below tests more on the subject.


Questions and Answers
  • 1. 
    We want a user to enter exactly 20 values, which loop would be the best to use?
    • A. 

      Do-while

    • B. 

      While

    • C. 

      For

    • D. 

      None

  • 2. 
    In a for statement, which expression is executed only once.
    • A. 

      Validation

    • B. 

      Test

    • C. 

      Initialization

    • D. 

      None

  • 3. 
    Which of the following loop is called a counter loop?
    • A. 

      For

    • B. 

      While

    • C. 

      Do-while

    • D. 

      All

  • 4. 
    The number of bytes used by int data type in C++ is?
    • A. 

      2

    • B. 

      8

    • C. 

      12

    • D. 

      16

  • 5. 
    The Integer,long and short data types are also called?
    • A. 

      Integer Data types

    • B. 

      Non-Integer Data types

    • C. 

      Float data types

    • D. 

      Non-numerica data types

  • 6. 
    Which statement is true about data types?
    • A. 

      Each data type has no memory requirement

    • B. 

      Each data type has different memory requirements

    • C. 

      Each data type has same memory requirements

    • D. 

      None of the above

  • 7. 
    Which of the following is used for making a two way decision?
    • A. 

      If-else

    • B. 

      If

    • C. 

      Nested if

    • D. 

      None

  • 8. 
    A data structure in C++ is a group of _________  grouped together under one name.
    • A. 

      Data Items

    • B. 

      Functions

    • C. 

      Modifiers

    • D. 

      None

  • 9. 
    A for loop contains three expressions: initialization, test, and
    • A. 

      Null

    • B. 

      Validation

    • C. 

      Increment/decrement

    • D. 

      None

  • 10. 
    Describe Data structure in C++? Why these are used?
  • 11. 
    Write a program using data structure which stores and display roll number, cnic and cgpa of a student.
Related Topics
Back to Top Back to top