Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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


}
output?



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

Answer / 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

More C Interview Questions

What is struct node in c?

0 Answers  


What language is c written?

0 Answers  


Why does the call char scanf work?

0 Answers  


Write a program that will read the input of any number of digits n in a row of shafh showing the breakdown of the printing and printing figures by the recursive function.

0 Answers  


Explain what is wrong in this statement?

0 Answers  


how to swap four numbers without using fifth variable?

2 Answers  


What is the right type to use for boolean values in c?

0 Answers  


What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }

1 Answers  


can any one provide me the notes of data structure for ignou cs-62 paper

0 Answers   Ignou,


What is the use of #include in c?

0 Answers  


C program to find frequency of each character in a text file?

6 Answers  


Differentiate call by value and call by reference?

0 Answers   Cyient,


Categories