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 spark map function?
How can variables be characterized?
What is the explanation for cyclic nature of data types in c?
Explain why c is faster than c++?
What is hungarian notation? Is it worthwhile?
What are the types of pointers in c?
Can a file other than a .h file be included with #include?
What is difference between structure and union in c?
How is = symbol different from == symbol in c programming?
What is the purpose of ftell?
How many types of sorting are there in c?
How do you list a file’s date and time?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
How can you tell whether a program was compiled using c versus c++?
Why is it usually a bad idea to use gets()? Suggest a workaround.