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 below

int n=10;
(n++)++;
printf("%d",n);

Answer Posted / deepak kumar

error : lvalue required.

n++ return 10 and after that n will increase to 1.
so now n=11
but next operation (postfix operator) is performing on
constant value 10 which is returned by (n++) operation.
it actually try to assign 11 to constant value 10. it is not
possible .
firstly we have to store it in a variable and then increment
can take place..

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3632


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

1921


What does node * mean?

1144


Write a program to generate the Fibinocci Series

1162


What is a pointer and how it is initialized?

1082


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

2168


Is this program statement valid? INT = 10.50;

1083


What is c value paradox explain?

1020


What is typedef example?

1112


Why do we use null pointer?

997


Can we assign string to char pointer?

1042


What is array within structure?

1061


Write a program to reverse a given number in c?

981


How is a macro different from a function?

1118


write a program for the normal snake games find in most of the mobiles.

2215