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
Why does the call char scanf work?
What is the process of writing the null pointer?
All technical questions
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Add Two Numbers Without Using the Addition Operator
How many keywords are there in c?
a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above
What is the size of array float a(10)?
If the size of int data type is two bytes, what is the range of signed int data type?
What is the main difference between calloc () and malloc ()?
What does 4d mean in c?
Write a program to reverse a string.
What is the significance of an algorithm to C programming?
Why does everyone say not to use gets?
What is the best style for code layout in c?