#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 definition of incapsulation
can you give the dynamic polymorphism types?
What is the difference between procedural programming and oops?
When will a constructor executed?
When you define a integer it gets stored in which data structure?(Stack or a heap)
What is data binding in oops?
What is oops in programming?
Write on signed and unsigned integers and give three (3) examples each
create a c++ program that will accepts 9 inputs using 3 by 3 array.
What is virtual class and friend class?
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is the important feature of inheritance?