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
How do we print only part of a string in c?
What is a macro in c preprocessor?
Which is best book for data structures in c?
Explain what is a 'locale'?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What language is windows 1.0 written?
Explain what are run-time errors?
What is the explanation for modular programming?
What is header file definition?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
what do u mean by Direct access files? then can u explain about Direct Access Files?
What does typedef struct mean?
What are the different types of errors?
what is the difference between class and unio?
What is a buffer in c?