Discussion :: Functions - C++
-
What will be the output of the following program?
#include class Gate { int x, y; public: void show(void); void main(void); }; void Gate::show(void) { Gate b; b.x = 2; b.y = 4; cout" " void Gate::main(void) { Gate b; b.x = 6; b.y = 8; b.show(); } int main(int argc, char *argv[]) { Gate run; run.main(); return 0; }
|
A.
2 4 |
|
B.
6 8 |
|
C.
The program will report error on Compilation. |
|
D.
The program will report error on Linking. |
|
E.
The program will report error on Run-time. |
Answer : Option B
Explanation :
No answer description available for this question.
Be The First To Comment

Whatsapp
Facebook