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
What is the use of pragma in embedded c?
How to delete a node from linked list w/o using collectons?
Why malloc is faster than calloc?
Do you have any idea about the use of "auto" keyword?
What is calloc() function?
Is c++ based on c?
explain what are pointers?
What are the types of pointers?
What is static memory allocation?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What is the use of define in c?
Why is c known as a mother language?
What is the scope of static variable in c?
Are comments included during the compilation stage and placed in the EXE file as well?
What is an expression?