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 for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}

Answer Posted / sumalatha

Ans is 2 2 2
because in printf assosiativity is from left to right
first pre increments i that becomes 2 next post increment
is done after printf stmt so prints 2 again, then simple
print i i.e 2again
last post increnent which i becomes 3 but that is done
after printf stmt

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the salient features of c languages?

1141


When is the “void” keyword used in a function?

1586


What is wrong with this initialization?

1065


Write a program to implement queue.

1175


a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list

1120


What are the basic data types associated with c?

1319


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1249


What are the 5 types of organizational structures?

1135


How do c compilers work?

1201


Can a file other than a .h file be included with #include?

1225


How can I rethow can I return a sequence of random numbers which dont repeat at all?

1241


Explain how can I avoid the abort, retry, fail messages?

1107


What are multidimensional arrays?

1175


What do header files do?

1140


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

2083