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 uint8 in c?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What is New modifiers?
Why structure is used in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What does 1f stand for?
Why c is called a middle level language?
Write a program to check palindrome number in c programming?
what is the diffrenet bettwen HTTP and internet protocol
What is the use of printf() and scanf() functions?
regarding pointers concept
Difference between goto, long jmp() and setjmp()?
How many main () function we can have in a project?
What is pointer & why it is used?