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

what is the output of following question?

void main()
{
int i=0,a[3];
a[i]=i++;
printf("%d",a[i]
}

Answer Posted / sha

Vignesh, you are right about the post incerement operation.
The a[i]=a[0] which will be assigned 0 but the printf will
print 0 as output because its printing the a[0] and not a
[1].

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a structure member in c?

1019


Difference between macros and inline functions? Can a function be forced as inline?

1289


Who invented b language?

1430


Why malloc is faster than calloc?

1081


Can the size of an array be declared at runtime?

1103


What's a good way to check for "close enough" floating-point equality?

1181


When should a type cast be used?

1029


Why does not c have an exponentiation operator?

1066


Explain what is wrong with this program statement? Void = 10;

1275


What is the difference between array_name and &array_name?

1315


Why does this code crash?

1109


What is a program flowchart and explain how does it help in writing a program?

1326


Do you have any idea how to compare array with pointer in c?

1065


What are static variables in c?

1094


Is it possible to pass an entire structure to functions?

1009