#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
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 |
what is the 3 types of system development life cycle
why c++ is called OOPS? waht is inherutance? what is compiler?
can we make a class static without using static keyword?
Write pseudo code for push in a stack?
What is late bound function call and early bound function call? Differentiate.
create a c++ program that will accepts 9 inputs using 3 by 3 array.
What is the significance of classes in oop?
What is multilevel inheritance explain with example?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What is polymorphism and its types?
What are the two different types of polymorphism?
why to use template classes in c++?