Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

#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]];
}

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why interface is used?

956


What are oops methods?

945


What is destructor oops?

1035


What is multilevel inheritance?

1152


What is class encapsulation?

1030


Why multiple inheritance is not possible?

1018


When not to use object oriented programming?

1020


How do you achieve polymorphism?

1037


How do you define a class in oop?

1060


Why do we need polymorphism in c#?

1095


hi all..i want to know oops concepts clearly can any1 explain??

2081


What are oops functions?

962


What do you mean by abstraction?

1024


why reinterpret cast is considered dangerous?

2336


What is the point of polymorphism?

995