#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 |
Can static class have constructor?
Can java compiler skips any statement during compilation time?
Who invented oop?
If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
any one please tell me the purpose of operator overloading
can you explain how to use JavaBean in Project
what is the 3 types of system development life cycle
what is virtual function?
26 Answers Aspire, HP, Infosys, RoboSoft, TCS,
What does and I oop and sksksk mean?
c++ is a purely oop concept?
how to write a java program for an output ****0 ***01 **012 *0123 01234
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }