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
Write a program with dynamically allocation of variable.
if p is a string contained in a string?
What is data structure in c language?
Why dont c comments nest?
What happens if you free a pointer twice?
Define macros.
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
Is c is a middle level language?
What is the use of volatile?
Why double pointer is used in c?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is assignment operator?
How do you define a string?
What is sizeof int?
How can I read in an object file and jump to locations in it?