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 / pragathi

3 is the answer bcoz
i=1
num[i]=i++;
num[1]=2;
here i=2
printf("%d", num[2]);

here 3 is there at position 2 .
so answer is 3

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pass by reference in functions?

855


Which is better oop or procedural?

1082


Why array is used in c?

1026


What is the condition that is applied with ?: Operator?

1135


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1985


What are dangling pointers in c?

1253


What is character set?

1178


What are the types of data types and explain?

1094


Differentiate between a structure and a union.

1296


what is the function of pragma directive in c?

1127


How do you print only part of a string?

1023


Do you know the use of 'auto' keyword?

1205


What is new line escape sequence?

1361


Does c have function or method?

1011


What are the complete rules for header file searching?

1094