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
1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
What does node * mean?
Write a program to generate the Fibinocci Series
What is a pointer and how it is initialized?
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.
Is this program statement valid? INT = 10.50;
What is c value paradox explain?
What is typedef example?
Why do we use null pointer?
Can we assign string to char pointer?
What is array within structure?
Write a program to reverse a given number in c?
How is a macro different from a function?
write a program for the normal snake games find in most of the mobiles.