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
Are the variables argc and argv are local to main?
Write a Program to find whether the given number or string is palindrome.
What does calloc stand for?
Explain what is a 'locale'?
Explain how are portions of a program disabled in demo versions?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Explain what is the difference between far and near ?
What are header files in c?
What is the purpose of ftell?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
What is pass by reference in functions?
What is a shell structure examples?
What is assert and when would I use it?
Is c still used?
What is the size of structure pointer in c?