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 are the restrictions of a modulus operator?

628


What does malloc () calloc () realloc () free () do?

554


When should I declare a function?

621


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

1585


Is sizeof a keyword in c?

574






What do you understand by friend-functions? How are they used?

641


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1489


What is c programing language?

612


What are static variables in c?

626


Can variables be declared anywhere in c?

614


Where we use clrscr in c?

695


How will you write a code for accessing the length of an array without assigning it to another variable?

611


What is else if ladder?

603


What does typedef struct mean?

654


Explain can you assign a different address to an array tag?

641