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

If the size of int data type is two bytes, what is the range of signed int data type?

1014


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1221


What are integer variable, floating-point variable and character variable?

1234


How we can insert comments in a c program?

1109


Combinations of fibanocci prime series

1601


Tell us something about keyword 'auto'.

1060


When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?

1053


Is null a keyword in c?

1186


What is cohesion and coupling in c?

1021


Can we replace the struct function in tree syntax with a union?

1295


Explain how can you tell whether a program was compiled using c versus c++?

1092


What is static and volatile in c?

1215


What is a nested formula?

1122


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

2062


What is int main () in c?

1072