#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

Why it is called runtime polymorphism?

0 Answers  


Program to check whether a word starts with a capital letter or not.

1 Answers   Infosys,


how to tackle technical questions

1 Answers  


What is polymorphism oop?

0 Answers  


Can we call a base class method without creating instance?

6 Answers  






Write a program to find out the number of palindromes in a sentence.

1 Answers   TCS,


How can you overcome the diamond problem in inheritance?

0 Answers   NIIT,


What is multilevel inheritance?

0 Answers  


What is abstraction and encapsulation?

0 Answers  


Write A Program using Single and Multiple Inheritance.

1 Answers  


i got a backdoor offer in process global,Bangalore..Can i work with it?

0 Answers  


What is debug class?what is trace class? What differences are between them? With examples.

0 Answers  


Categories