Instruction
- Total number of questions : 10.
- Time alloted : 10 minutes.
- Each question carry 1 mark.
- No Negative marks
- DO NOT refresh the page.
- All the best :-).
1. |
What does a escape code represent ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Because a is used to produce a beep sound. |
2. |
What happens when a null pointer is converted into bool ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: A pointer can be implicitly converted to a bool. A nonzero pointer converts to true and zerovalued |
3. |
What will be the output of this program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: The literal value for 74 is J. So it will be printing J. |
4. |
What will be output of this function? int main () { register int i = 1 ; int * ptr = & i; cout << *ptr ; return 0 ; }
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: Using & on a register variable may be invalid, since the compiler may store |
5. |
What is the output of this program ? #include <iostream> using namespace std; int main () { char arr [20 ] ; int i; for( i = 0 ; i < 10 ; i++ ) *( arr + i ) = 65 + i ; *( arr + i ) = '\0 '; cout << arr; return( 0) ; }
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Each time we are assigning 65 + i. In first iteration i = 0 and 65 is assigned. |
6. |
What is the output of the following program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: We will get compilation error because ‘i’ is an undeclared identifier. |
7. |
What is the use of functor ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: None |
8. |
What is the use of function call operator ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: None |
9. |
What is the output of the following program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: In this program, We are dividing the values of a and b, printing it. |
10. |
What is the output of this program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: Explanation:value of ‘a’ will be stored in c and then only it will be incremented. |