main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answer Posted / vishnu
hi all,
i think *ptr=(int*)malloc(size of (int));
*ptr=4;
mean malloc(size of (int)) is used to allocate memory of only 4.
hence(*ptr)+++*ptr++)=4+4=8
| Is This Answer Correct ? | 28 Yes | 43 No |
Post New Answer View All Answers
What is a void pointer in c?
Why is #define used?
write a program to rearrange the array such way that all even elements should come first and next come odd
What is ## preprocessor operator in c?
What is a far pointer in c?
Is a house a shell structure?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
Whats s or c mean?
main() { printf("hello"); fork(); }
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What is data types?
Explain how can type-insensitive macros be created?
Write a program to swap two numbers without using third variable?
What is identifier in c?