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...

main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}

what will be the output?
}

Answer Posted / xyz

the answer will be 3 b'coz whatever the "num[i] = i++;"
this expression the output will be depend's on "i" and
at last i will be 2 and num[2]=3 which is the answer.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between static and global variable in c?

980


What is the use of c language in real life?

972


What is a #include preprocessor?

1076


Why is struct padding needed?

1031


What is the equivalent code of the following statement in WHILE LOOP format?

1248


Why do we use stdio h and conio h?

1032


Explain what is the benefit of using an enum rather than a #define constant?

1168


Is calloc better than malloc?

974


Is file a keyword in c?

886


What are header files and what are its uses in C programming?

1133


Explain spaghetti programming?

1189


Explain the array representation of a binary tree in C.

1166


What is floating point constants?

1080


Can you write the function prototype, definition and mention the other requirements.

1084


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1442