OOPS interview questions – page 3

93 questions. Tap “Show answer” to check yourself.

Advertisement
  1. Which of the following are used to enclose the body of a function?

    1. {}
    2. []
    3. ()
    4. None of above
    Show answer

    A. {}

  2. The C language is a ____ language.

    1. Middle
    2. Low
    3. High
    4. None of above
    Show answer

    A. Middle

  3. By the process of linking, the resulting code is called as ____

    1. Source code
    2. Object code
    3. Executable code
    4. None of the above
    Show answer

    C. Executable code

  4. In the ____ structure, the logical expression is checked first.

    1. Do-while
    2. If
    3. While-loop
    4. All types
    Show answer

    C. While-loop

  5. The keyword struct introduces _____

    1. Array declaration
    2. Loop declaration
    3. Structure declaration
    4. All of the above
    Show answer

    C. Structure declaration

  6. Which of the following will fix the length from the values assigned in the declaration statement?

    1. C compiler
    2. CPU of C
    3. Editor
    4. Star Office compiler
    Show answer

    A. C compiler

  7. A list of variables in the function definition of an input is called ____

    1. Local variable
    2. Variable
    3. Dummy parameter
    4. Parameter
    Show answer

    C. Dummy parameter

  8. Which character is used to indicate the end of the string?

    1. Any alphabet
    2. A
    3. Null
    4. None of these
    Show answer

    C. Null

  9. Each element of a structure can be _____

    1. Read and printed as a separate data item
    2. Printed as a separate data item
    3. Read as a separate data item
    4. None of these
    Show answer

    A. Read and printed as a separate data item

  10. In the for loop structure, which statement is present?

    1. Assign statement
    2. Alter statement
    3. Both (a) and (b)
    4. None of these
    Show answer

    C. Both (a) and (b)

  11. When the computer is waiting for the input?

    1. Files are selected
    2. The cursor is blinking in the VDU screen
    3. Menu will appear on the screen
    4. None of these
    Show answer

    B. The cursor is blinking in the VDU screen

  12. Which can be included in a string constant using the escape sequences?

    1. Apostrophe (’)
    2. Question mark (?)
    3. Double quotes (“)
    4. All the above
    Show answer

    D. All the above

  13. Advertisement
  14. The Library functions used for _____ are kept in the header file called stdio.h.

    1. I/O purpose
    2. Mathematical functions
    3. Keywords
    4. Functions
    Show answer

    A. I/O purpose

  15. The ___ statement is used in the loops to skip a part of the loop and continue the next cycle of the loop.

    1. Continue
    2. If
    3. Switch
    4. Break
    Show answer

    A. Continue

  16. To deal each element of the array separately _____ are used.

    1. Arrays
    2. Structures
    3. Loops
    4. Control statements
    Show answer

    C. Loops

  17. Which of the following format infers that data is displayed is a string?

    1. d
    2. f
    3. g
    4. s
    Show answer

    D. s

  18. A floating point constant can be expressed in

    1. Exponential form
    2. Fractional form
    3. Both forms
    4. None of these
    Show answer

    C. Both forms

  19. A friend function can be used to

    1. allow one class to access an unrelated class
    2. allow access to classes whose source code is unavailable
    3. increase versatility of an over-loaded operator
    4. avoid arguments between classes
    Show answer

    A. allow one class to access an unrelated class

  20. Which of the following is not an arithmetic operator?

    1. +
    2. *
    3. %
    4. &
    Show answer

    D. &

  21. Which of the following character is used to terminate an instruction in a C program?

    1. , (comma)
    2. : (colon)
    3. . (period)
    4. ; (semicolon)
    Show answer

    D. ; (semicolon)

  22. In _____ we have to instruct the computer in each and every step.

    1. Code
    2. Pseudo code
    3. Algorithm
    4. Flow chart
    Show answer

    A. Code

  23. The && and || operators compare two

    1. boolean values
    2. boolean value
    3. numeric values
    4. numeric value
  24. The function abort() is declared in the header file

    1. <math.h>
    2. <iostream.h>
    3. <stdio.h>
    4. <stdlib.h>
    Show answer

    B. <iostream.h>

  25. In C++, when accessing a structure member, the identifier to the left of the dot operator is the name of

    1. structure tag
    2. structure member
    3. structure variable
    4. keyword struck
    Show answer

    C. structure variable

  26. Advertisement
  27. How many values can be returned from a function?

    1. 1
    2. 2
    3. 3
    4. 4
    Show answer

    A. 1

  28. A pointer is

    1. data type of an address variable
    2. a variable for storing address
    3. indication of the variable to be accessed next
    4. address of a variable
    Show answer

    B. a variable for storing address

  29. A relational operator

    1. assigns operand to another
    2. yields a Boolean result
    3. logically combines two operands
    4. compares two operands
    Show answer

    D. compares two operands

  30. An array element is accessed using

    1. member name
    2. an index number
    3. dot operator
    4. a first in first out approach
    Show answer

    B. an index number

  31. The acronym ANSI stands for

    1. American National Standards International
    2. American National Standards Instructions
    3. American National Standards Institute
    4. American National Software Incorporation
    Show answer

    C. American National Standards Institute

  32. _____ is a variable name used to identify a function.

    1. Name
    2. Structure name
    3. Function name
    4. Variable name
    Show answer

    C. Function name

Advertisement