#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 |
How to create a comment page in C #??
what does exactly the linker do?
why to use template classes in c++?
What is the point of oop?
What are classes oop?
What is constructor overloading in oop?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is polymorphism used for?
What is the Advantage of Interface over the Inheritance in OOPS?
What are the three parts of a simple empty class?
What is the concept of object oriented program?
Why do we use class?