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
Explain two-dimensional array.
How many types of functions are there in c?
Tell us bitwise shift operators?
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 are the advantage of c language?
What are the two types of structure?
Who developed c language?
Differentiate between declaring a variable and defining a variable?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
how to introdu5ce my self in serco
How can I make it pause before closing the program output window?
What kind of structure is a house?
Explain how can I write functions that take a variable number of arguments?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
What are the properties of union in c?