#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

what uses of c++ language?

3 Answers  


What is this interview room ? Is it a class or an object.

3 Answers   CybAge, NSN, Wipro,


Program to read a comment string

1 Answers   IBM,


me get an assignent n its question is this 1.creat a set as in math i.ea={1,2} 2.insert element in it3. delete element don,t repeat any element 4.union 5. intersection of two sets plz help me i always pray for u n send me at ayeshawzd@hotmail.com f u have c++ how to program 5th addition then it is the 10.9 question in 10th chapter exercise

1 Answers  


What does no cap mean?

0 Answers  






What is cohesion in oop?

0 Answers  


can you give the dynamic polymorphism types?

2 Answers   Wipro,


What are main features of oop?

0 Answers  


Precompilation ?

1 Answers   emc2,


What is a unary operator?

5 Answers  


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

0 Answers   UBS,


1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)

1 Answers   Nagarro,


Categories