QUESTION 1
We can use this pointer in static member function of the
class.
a) True
b)False
QUESTION 2
What is the output of the following program?
main() { }
a)No Output
b) Garbage
c)Compile error
d)Runtime Error
QUESTION 3
In the following program f() is overloaded.
void f(int x) { } int f(signed x) { return 1; } main() { }
a) True
b)False
QUESTION 4
i) single file can be opened by several streams
simultaneously.
ii) several files simultaneously can be opened by a single
stream
a) Only (i) is true
b) (i) and (ii) are true
c)Only (ii) is true
d)None of the answers
QUESTION 5
What is the output of the following program?
#include<iostream> using namespace std; void f() { static int i = 3; cout<<i; if(--i) f(); } main() { f(); }
a)3 2 1
b)3 2 1 0
c)3 3 3
d)Compile Error
QUESTION 1 We can use this pointer in static member function of the class. Answer: a) True QUESTION 2 output of the following program main() { } Answer: a)No Output QUESTION 3 f() is not overloaded Answer: b)False QUESTION 4 single file can be opened by several streams simultaneously. is True Answer: a) Only (i) is true QUESTION 5 output of the following program #include<iostream> using namespace std; void f() { static int i = 3; cout<<i; if(--i) f(); } main() { f(); } is 3 2 1 Answer: a) 3 2 1
Get Answers For Free
Most questions answered within 1 hours.