Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C++ Programming
»
Functions
Which of the following statement is correct about the program given below? #include<iostream.h> class CuriousTabArray { int array[3][3]; public: CuriousTabArray(int arr[3][3] = NULL) { if(arr != NULL) for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) array[i][j] = i+j; } void Display(void) { for(int i = 0; i < 3; i++) for(int j = 0; j < 3; j++) cout<< array[i][j] << " "; } }; int main() { CuriousTabArray objBA; objBA.Display(); return 0; }
The program will report error on compilation.
The program will display 9 garbage values.
The program will display NULL 9 times.
The program will display 0 1 2 1 2 3 2 3 4.
Show Answer
Correct Answer:
The program will display 9 garbage values.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment