void main()
{
int *ptr;
ptr = (int *) 0x400 ;
printf("ptr=%d",ptr);


}
output?

Answer Posted / koti

Ans is 1024.
Why because here ptr is pointing to integer address 0x400.this is hexadecimal address but you are printing decimal value.
The hexadecimal value is
........0000 0100 0000 0000
2 power10 =1024.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of pragma in embedded c?

783


How to delete a node from linked list w/o using collectons?

2385


Why malloc is faster than calloc?

800


Do you have any idea about the use of "auto" keyword?

861


What is calloc() function?

855


Is c++ based on c?

835


explain what are pointers?

788


What are the types of pointers?

777


What is static memory allocation?

841


which is conditional construct a) if statement b) switch statement c) while/for d) goto

987


What is the use of define in c?

792


Why is c known as a mother language?

964


What is the scope of static variable in c?

724


Are comments included during the compilation stage and placed in the EXE file as well?

870


What is an expression?

837