what is difference between ++(*p) and (*p)++
Answer Posted / alok kumar
++(*p) :- means that first increment the value of that variable which address holds p .than any operation will perform. ex:- int a=10;int *p; p=&a;
int c=++(*p);printf("%d,%d",c,*p);out put:-11 , 11 .
(*p)++ :- means that first assign the value than increment the value by 1. ex:- int a=10;int *p; p=&a;
int c=(*p)++;printf("%d,%d",c,*p);out put:-10 , 11 .
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we change the value of #define in c?
Explain what is the most efficient way to store flag values?
What is a floating point in c?
What are the disadvantages of c language?
What is a lvalue
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Can include files be nested?
What is string function in c?
What is use of #include in c?
In a switch statement, explain what will happen if a break statement is omitted?
Why c language?
How arrays can be passed to a user defined function
What is c language in simple words?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?