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
What is a ternary operator in c?
What is the general form of function in c?
Write a program to print numbers from 1 to 100 without using loop in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
What is null in c?
Explain can static variables be declared in a header file?
What is the explanation for prototype function in c?
What does main () mean in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
Are there constructors in c?
What are linker error?
Tell me what is the purpose of 'register' keyword in c language?
Why static is used in c?
Did c have any year 2000 problems?
What is the general form of a C program?