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

Answer is :: 3

Explanation::

main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++; // Here i = 1, so num[1] = 1; and num =
{1,1,3,4}
// After the execution of this statement the value of i
will be 2 (as i++)
printf("%d", num[i]); // num[2] = 3 so answer is 3
}
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is action and transformation in spark?

1172


Explain Function Pointer?

1187


Explain what is the concatenation operator?

1179


What is the difference between the = symbol and == symbol?

1130


how do you programme Carrier Sense Multiple Access

1975


What is FIFO?

1746


On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area

1128


Why c is called procedure oriented language?

1061


Is multithreading possible in c?

1023


How can you return multiple values from a function?

1126


What language is windows 1.0 written?

1082


What is wrong in this statement?

1161


What is clrscr in c?

1140


What 'lex' does?

1190


What does 4d mean in c?

1509