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 NULL pointer?
What are the functions to open and close file in c language?
The difference between printf and fprintf is ?
how could explain about job profile
what is stack , heap ,code segment,and data segment
Is c weakly typed?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is the purpose of ftell?
How do you redirect a standard stream?
What is the difference between malloc calloc and realloc in c?
Define C in your own Language.
Explain the meaning of keyword 'extern' in a function declaration.
What is scope of variable in c?
When should the const modifier be used?
Explain main function in c?