Object Oriented Programming In C++ MCQs

Multiple Choice Questions 37 Pages
MPC
Loading
  • OBJECT ORIENTED PROGRAMMING IN C++
    For Off Campus BSc Computer Science Programme
    UNIT 1
    1.
    The goal of programmers is to develop software that are___________
    .
    A. Correct
    B. R
    eliable and maintainable
    C. S
    atisfy all the user requirements
    D. All of the above
    2.
    Software development is not a ________ process
    :
    A. Complicated
    B. Static
    C. Simple
    D. None of the above
    3. What
    describes the structure of a program?
    A.
    Programming paradigm
    B.
    Programming methodology
    C. Both (a) and (b)
    D. None of the above
    4.
    Initially, when the computers were invented, what was used to write the programs?
    A. FRONTAN
    B. BASIC
    C. Binary program
    D. None of the above
    5.
    Any software needs to be modified or redesigned according to change in__________
    :
    A.
    User requirements
    B.
    Business rules
    C. Strategies
    D. All of the above
    6.
    Then the assembly language was invented to write large programs, however, it was also
    not____________
    .
    A. Interesting
    B. Easy

    Page 1

  • C. User friendly
    D. None of the above
    7.
    With the change in the user requirements, the size and the complexity of the programs continued
    to grow, which led to the development of high-level languages, such as
    A. FRONTAN
    B. BASIC
    C. Both (a) and (b)
    D. Binary language
    8.
    In unstructured programming paradigm, all the instructions of a program were written one after the
    other in a single function and hence, suitable for writing only____________.
    A. Small programs
    B. Simple programs
    C. Large and simple programs
    D. Both (a) and (b
    9.
    For large and complex programs, it became difficult to____________.
    A. Trace and debug errors
    B. Write programs
    C. Bug errors
    D. None of the above
    10.
    To overcome the limitations of unstructured programming paradigm, which other programming
    paradigms were developed?
    A. P
    rocedural programming paradigms (PPP)
    B.
    Object-oriented programming paradigms (OOP)
    C. Both (a) and (b)
    D.
    Software programming paradigms
    11. Which
    paradigm has revolutionized the process of software development?
    A. Software programming
    B. OOP
    C. PPP
    D. None of the above
    12.
    The most important feature is that OOP divides the program into a number of_________
    .
    A. Functions
    B. Software
    C. Objects
    D. None of the above

    Page 2

  • 13.
    An object is a unit of structural and behavioral modularity that contains a set of________.
    A. Properties
    B. Data
    C.
    Associated functions
    D. All of the above
    14.
    What does OOP emphasizes on?
    A. Functions
    B. Data
    C. Procedures
    D. None of the above
    15. __________
    are the small, self-contained and modular units with a well-defined boundary
    .
    A. Objects
    B. Data
    C. Classes
    D. Abstractions
    16. What
    is defined as a user-defined data type which contains the entire set of similar data and the
    functions that the objects possess
    ?
    A. Inheritance
    B.
    Encapsulation
    C. Class
    D. None of the above
    17.
    Encapsulation is the technique of binding or keeping the __________-(that operate on them)
    together in a single unit called a class.
    A. Data
    B. Functions
    C. Objects
    D. Both (a) and (b)
    18.
    Polymorphism is a _________word.
    A. French
    B. Latin
    C. Greek
    D. English
    19.
    In C++, polymorphism can be achieved either at___________.
    A. Compile time
    B. Run-time

    Page 3

  • C. Both (a) and (b)
    D. Virtual functions
    20. What
    is the process of interacting between different objects in a program called?
    A. Abstract classes
    B. Message passing
    C. Concrete classes
    D. Encapsulation

    Page 4

  • UNIT 2
    21.
    In any programming language, writing even an elementary program requires the knowledge and
    clear understanding of ___________.
    A. Data types
    B. Variables and constants
    C. Operators
    D. All of the above
    22.
    A character set can be defined as a set of characters that____________represents information.
    A. Individually or in combination
    B. In combination
    C. Do not
    D. Both (a) and (b)
    23.
    When a program is compiled, what scans the source code and parses it into tokens to find the
    syntax errors?
    A.
    Data types
    B.
    Compiler
    C.
    Horizontal tab
    D. None of the above
    24. __________________ are the predefined words that have special significance in any
    language.
    A. Variables
    B. Data types
    C. Constants
    D. Keywords
    25. Every keyword is reserved for a specific purpose and hence must not be used
    as__________________.
    A. User-defined names
    B. Identifiers
    C. Plain
    D. Both (a) and (b)
    26.
    Identifiers are the names given to uniquely identify various programming elements
    like________
    .
    A.
    Variables and arrays
    B. F
    unctions and classes

    Page 5

  • C.
    Structures and namespaces
    D. All of the above
    27.
    An identifier must contain only____________.
    A.
    Upper case and lower case letters
    B.
    Underscore character (_) or digits 0 to 9
    C. Both (a) and (b)
    D. None of the above
    28.
    What should an identifier start with?
    A. Letter
    B. Underscore
    C. Letter or underscore
    D. D
    igits 0 to 9
    29.
    Identifiers that start with a double underscore ‘__’ or an underscore followed by an upper case
    letter must be avoided as these names are reserved by the__________.
    A.
    Standard C++ Library
    B.
    Standard C Library
    C.
    C++ Library
    D. None of the above
    30.
    Numeric constants refer to the numbers consisting of a sequence of digits (with or without
    decimal point) that can be________.
    A. Positive
    B. Negative
    C. Alphanumeric
    D. Both (a) and (b)
    31. In to how many categories can
    C++ constants be broadly classified into
    ?
    A. Four
    B. Two
    C. Three
    D. Multiple
    32.
    There are few character constants that cannot be included in a program directly through a
    keyboard, such as__________.
    A. Backspace
    B. Newline
    C. Both (a) and (b)
    D. Insert

    Page 6

  • 33.
    Wide character literal uses how many bytes of memory?
    A. Two
    B. One
    C. Multiple
    D. None of the above
    34.
    A data type determines the _______________ that can be performed on the data
    .
    A. Type
    B. Operations
    C. Memory
    D. Both (a) and (b)
    35. What is termed
    as a set of named integer constants that specify all the permissible values that
    can be assigned to enumeration variables
    ?
    A. Enumeration
    B. Reference
    C. Pointer
    D. None of the above
    36. What forms an expression?
    A. Variables
    B. Constants
    C. Operators
    D. All of the above
    37.
    The expressions that produce a bool type value, that is, either true or false are called______.
    A.
    Integral expressions
    B.
    Float expressions
    C.
    Relational or Boolean expressions
    D.
    Constant expressions
    38.
    The statements that cause a set of statements to be executed repeatedly either for a specific
    number of times or until some condition is satisfied are known as_____________.
    A.
    Iteration statements or loops
    B. Conditional operator
    C. The if-else statement
    D. The if statement

    Page 7

  • 39.
    The bool data type can hold only boolean values that is either true or false, where true represents
    ________ and false represents__________.
    A. 0,-1
    B. 0,1
    C. 1, 0
    D. None of the above
    40.
    In addition to char data type, C++ provides another data type wchar_t which is used to store
    _________ wide characters.
    A. 10 bit
    B. 32 bit
    C. 16 bit
    D. 64 bit
    41. Which
    variable stores the memory address of another variable?
    A. Reference
    B. Pointer
    C. Array
    D. None of the above
    42.What are the
    significant features of C language?
    A.
    Structure and union
    B. Class
    C.
    Enumerations
    D. None of the above
    43. If a variable is used prior to its initialization, what is produced?
    A. Garbage results
    B. Undesirable results
    C. Both (a) and (b)
    D. 10
    44.
    The expressions that produce a bool type value after combining two or more relational
    expressions are called ________________.
    A.
    Logical expressions
    B. Big Theta θ(f)
    C.
    Boolean expressions
    D. None of the above
    45.____________
    is an assignment expression, which is enclosed within other assignment
    expression
    .

    Page 8

  • A.
    Chained assignment
    B.
    Binary arithmetic operator
    C.
    Compound assignment
    D.
    Embedded assignment
    46
    Like built-in data types, memory can also be allocated dynamically to derived and userdefined
    data types such as__________.
    A. Arrays
    B. Structures
    C. Classes
    D. All of the above
    47.
    A single statement specifies a single action and is always terminated by a_________.
    A. Inverted commas
    B. Colon
    C. Semi colon
    D. Brackets
    48.
    The for loop is one of the most widely used loops in____________.
    A. C++
    B. C
    C. Iterations
    D. None of the above
    49.
    The break statement is extensively used in___________
    .
    A. Loops
    B.
    switch statements
    C. Both (a) and (b)
    D.
    continue statement

    Page 9

  • UNIT 3
    50.
    Handling real world data requires a mechanism that deals with a collection of_________
    ?
    A.Structures
    B. Data items
    C. Arrays
    D. None of the above
    51. __________
    is defined as a fixed size sequence of same type of data elements.
    A. C++
    B. Data items
    C. Arrays
    D. None of the above
    52. What is the simplest form of an array?
    A. One- dimensional array
    B. Multi- dimensional array
    C. Single- dimensional array
    53. If more than one subscript is used, an array is known as a__________.
    A. One- dimensional array
    B. Single dimensional array
    C. Multi- dimensional array
    D. None of the above
    54. The memory address of the first element of an array is contained in the _______.
    A. Next array
    B. Computer program
    C. Name of the array
    D. None of the above
    55. Each element in an array is associated with a unique subscript value, starting
    from__________:
    A. 1 to size-1
    B. 0 to size-1
    C. -1 to size-0

    Page 10

Download this file to view remaining 27 pages

logo StudyDocs
StudyDocs is a platform where students and educators can share educational resources such as notes, lecture slides, study guides, and practice exams.

Contacts

Links

Resources

© 2025 StudyDocs. All Rights Reserved.