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. |
Which datatype is used to represent the absence of parameters ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: void will not return anything. |
2. |
What is the value of the bool ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: The given number is a double not an integer, so the function returns 0 which |
3. |
Which of the following belongs to the set of character types ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option D Explanation: wchar_t and char is used to represent wide character and character. |
4. |
#include <iostream> using namespace std; int main() { int i = 3; int l = i / -2; int k = i % -2; cout << l << k; return 0; }
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: Sign of result of mod operation on negative numbers is sign of the dividend. |
5. |
The correct statement for a function that takes pointer to a float, a pointer to a pointer |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option C Explanation: None |
6. |
What is the output of this program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: The variable that is declared as static has a file scope. |
7. |
What is the output of this program ? #include using namespace std; int operate (int a, int b ) { return ( a * b ); } float operate (float a, float b ) { return ( a / b ); } int main () { int x = 5, y = 2 ; float n = 0 , m = 2.0 ; cout << operate ( x, y ); cout << operate ( n, m ); return 0 ; }
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option B Explanation: In this program, We are overloading the function and getting the output as 10 and 2.5 by division and multiplication. |
8. |
What is the use of functor ? |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: None |
9. |
What is the output of this program ?
|
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: We are coping the value john to the name and then we are printing the values that are in the program. |
10. |
Pick out the correct statement. |
|||||||||||||||||||
Your Answer: Option (Not Answered) Correct Answer: Option A Explanation: none |