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
I need previous papers of CSC.......plz help out by posting them.......
What does sizeof function do?
In which header file is the null macro defined?
write a program in c language to print your bio-data on the screen by using functions.
A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
What is difference between union and structure in c?
Explain how can I write functions that take a variable number of arguments?
How do you generate random numbers in C?
What is an operator?
What is a union?
What does the file stdio.h contain?
Why do we use stdio h and conio h?
largest Of three Number using without if condition?
Is a house a shell structure?
What is the difference between text files and binary files?