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
Why is c fast?
What is calloc malloc realloc in c?
How can you convert integers to binary or hexadecimal?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
State the difference between x3 and x[3].
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is class and object in c?
What does. int *x[](); means ?
Explain what is wrong with this statement? Myname = ?robin?;
What is the difference between abs() and fabs() functions?
Is c high or low level?
What is the difference between Printf(..) and sprint(...) ?
What is actual argument?
Explain union. What are its advantages?
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?