#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 is the real time example of encapsulation?

0 Answers  


What is the difference between procedural programming and oops?

0 Answers  


What is a mixin class?

4 Answers  


create a c++ program that will accepts 9 inputs using 3 by 3 array.

1 Answers  


In which cases you use override and new base?

2 Answers  


write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language

3 Answers   Satyam,


Why do we use polymorphism?

0 Answers  


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

0 Answers  


what is the difference b/w abstract and interface?

2 Answers   Merrill Lynch, Schneider, Scio Healthcare,


what is the difference between class and structure in C++?

9 Answers   Aspire, IBS, TCS,


Why a "operator=(...)" when there is a copy ctor?

2 Answers  


How to improve object oriented design skills?

0 Answers  


Categories