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
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
write a program to create a sparse matrix using dynamic memory allocation.
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What happens if a header file is included twice?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Is c procedural or object oriented?
what type of questions arrive in interview over c programming?
Can main () be called recursively?
Can you please compare array with pointer?
difference between object file and executable file
what do u mean by Direct access files? then can u explain about Direct Access Files?
Explain what are binary trees?
What is structure and union in c?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
Explain continue keyword in c