#include <iostream>
using namespace std;
int main() {
int a = 2;
int c[5][5];
for (int x=0;x<5;x++) {
for (int y=0;y<5;y++) {
c[x][y] = x*y;
}
}
cout << c[a][c[1][4]];
}

Answers were Sorted based on User's Feedback



#include <iostream> using namespace std; int main() { int a = 2; int c[5][5]; for (int x=..

Answer / bhavana

c[2][4]=8

Is This Answer Correct ?    12 Yes 0 No

#include <iostream> using namespace std; int main() { int a = 2; int c[5][5]; for (int x=..

Answer / girish

The answer of this program is very easy.
every time the arry indices are multiplication is done.
Then a is 2 this is right and the logic is in second index value is in square brackets[].
It calculate the second index value and it gives 1*4=4.
And the final answer is
a=2 and c[1][4] =4
then
c[2]4] is 8
Thank you

Is This Answer Correct ?    9 Yes 1 No

Post New Answer

More OOPS Interview Questions

can main method be overloaded...??? How..????

2 Answers   Satyam,


what is ns string? what is ns array?

1 Answers  


to remove the repeated numbers from the given . i.e.., if the input is 12233 output should of 123

2 Answers  


how many types of notations are in java

1 Answers   National University of Modern Languages (NUML),


how much classes are used in c++

5 Answers  






write a short note on Overloading of Binary Operator?

2 Answers  


how can we design a magic square in c++?or suggest me the basic idea of it.

3 Answers  


What are the important components of cohesion?

0 Answers  


sir plz send me a set of questions that been frequently held in written examination during campus selection.

0 Answers   TCS,


What are main features of oop?

0 Answers  


What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the scope resolution operator while accessing them. I want to know some other advantages of unnamed namespaces...

2 Answers  


What is multidimensional array?

1 Answers  


Categories