OOPS interview questions – page 3
93 questions. Tap “Show answer” to check yourself.
-
Which of the following are used to enclose the body of a function?
- {}
- []
- ()
- None of above
Show answer
A. {}
-
The C language is a ____ language.
- Middle
- Low
- High
- None of above
Show answer
A. Middle
-
By the process of linking, the resulting code is called as ____
- Source code
- Object code
- Executable code
- None of the above
Show answer
C. Executable code
-
In the ____ structure, the logical expression is checked first.
- Do-while
- If
- While-loop
- All types
Show answer
C. While-loop
-
The keyword struct introduces _____
- Array declaration
- Loop declaration
- Structure declaration
- All of the above
Show answer
C. Structure declaration
-
Which of the following will fix the length from the values assigned in the declaration statement?
- C compiler
- CPU of C
- Editor
- Star Office compiler
Show answer
A. C compiler
-
A list of variables in the function definition of an input is called ____
- Local variable
- Variable
- Dummy parameter
- Parameter
Show answer
C. Dummy parameter
-
Which character is used to indicate the end of the string?
- Any alphabet
- A
- Null
- None of these
Show answer
C. Null
-
Each element of a structure can be _____
- Read and printed as a separate data item
- Printed as a separate data item
- Read as a separate data item
- None of these
Show answer
A. Read and printed as a separate data item
-
In the for loop structure, which statement is present?
- Assign statement
- Alter statement
- Both (a) and (b)
- None of these
Show answer
C. Both (a) and (b)
-
When the computer is waiting for the input?
- Files are selected
- The cursor is blinking in the VDU screen
- Menu will appear on the screen
- None of these
Show answer
B. The cursor is blinking in the VDU screen
-
Which can be included in a string constant using the escape sequences?
- Apostrophe (’)
- Question mark (?)
- Double quotes (“)
- All the above
Show answer
D. All the above
- Advertisement
-
The Library functions used for _____ are kept in the header file called stdio.h.
- I/O purpose
- Mathematical functions
- Keywords
- Functions
Show answer
A. I/O purpose
-
The ___ statement is used in the loops to skip a part of the loop and continue the next cycle of the loop.
- Continue
- If
- Switch
- Break
Show answer
A. Continue
-
To deal each element of the array separately _____ are used.
- Arrays
- Structures
- Loops
- Control statements
Show answer
C. Loops
-
Which of the following format infers that data is displayed is a string?
- d
- f
- g
- s
Show answer
D. s
-
A floating point constant can be expressed in
- Exponential form
- Fractional form
- Both forms
- None of these
Show answer
C. Both forms
-
A friend function can be used to
- allow one class to access an unrelated class
- allow access to classes whose source code is unavailable
- increase versatility of an over-loaded operator
- avoid arguments between classes
Show answer
A. allow one class to access an unrelated class
-
Which of the following is not an arithmetic operator?
- +
- *
- %
- &
Show answer
D. &
-
Which of the following character is used to terminate an instruction in a C program?
- , (comma)
- : (colon)
- . (period)
- ; (semicolon)
Show answer
D. ; (semicolon)
-
In _____ we have to instruct the computer in each and every step.
- Code
- Pseudo code
- Algorithm
- Flow chart
Show answer
A. Code
-
The && and || operators compare two
- boolean values
- boolean value
- numeric values
- numeric value
-
The function abort() is declared in the header file
- <math.h>
- <iostream.h>
- <stdio.h>
- <stdlib.h>
Show answer
B. <iostream.h>
-
In C++, when accessing a structure member, the identifier to the left of the dot operator is the name of
- structure tag
- structure member
- structure variable
- keyword struck
Show answer
C. structure variable
- Advertisement
-
How many values can be returned from a function?
- 1
- 2
- 3
- 4
Show answer
A. 1
-
A pointer is
- data type of an address variable
- a variable for storing address
- indication of the variable to be accessed next
- address of a variable
Show answer
B. a variable for storing address
-
A relational operator
- assigns operand to another
- yields a Boolean result
- logically combines two operands
- compares two operands
Show answer
D. compares two operands
-
An array element is accessed using
- member name
- an index number
- dot operator
- a first in first out approach
Show answer
B. an index number
-
The acronym ANSI stands for
- American National Standards International
- American National Standards Instructions
- American National Standards Institute
- American National Software Incorporation
Show answer
C. American National Standards Institute
-
_____ is a variable name used to identify a function.
- Name
- Structure name
- Function name
- Variable name
Show answer
C. Function name