main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answer Posted / manil shrama
hello all..........
here malloc function reserves a memory space for an integer,whose adddess is pointed by integer pointer p.
Now at this memory space,4 istored by using *p = 4
(*p)+++means,*p=*p+2, (4+2=6)
and ptr++ means,*ptr=*ptr+1, (4+1=5)
now 4*5=30 is required answer
k bye.....tc
| Is This Answer Correct ? | 6 Yes | 49 No |
Post New Answer View All Answers
How does free() know explain how much memory to release?
When should you use a type cast?
What is data type long in c?
I have seen function declarations that look like this
What is a floating point in c?
How can a number be converted to a string?
How many types of errors are there in c language? Explain
What is the acronym for ansi?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
Why we not create function inside function.
show how link list can be used to repersent the following polynomial i) 5x+2
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
How can you restore a redirected standard stream?
What is getch () for?