main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answer Posted / ankit panwar
*ptr++ : it just increments the pointer not the value it is
pointing to..
++*ptr : it increments the value the pointer points to but
not the pointer..
here
(*ptr++) + (++*ptr) = 0 + (4+1) = 5
so the answer will definately be 5
| Is This Answer Correct ? | 2 Yes | 31 No |
Post New Answer View All Answers
What is %s and %d in c?
How do you construct an increment statement or decrement statement in C?
Can we declare variables anywhere in c?
Explain data types & how many data types supported by c?
What is spaghetti programming?
Explain how can I read and write comma-delimited text?
How can a program be made to print the line number where an error occurs?
Explain argument and its types.
Explain Function Pointer?
Write a function that will take in a phone number and output all possible alphabetical combinations
What is line in c preprocessor?
Write a program of advanced Fibonacci series.
Array is an lvalue or not?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
Explain Basic concepts of C language?