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?

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 bitwise operator?

1110


Why c is faster than c++?

1012


What is a lvalue

1068


What is the difference between fread and fwrite function?

1069


Compare and contrast compilers from interpreters.

1111


What is the total generic pointer type?

1145


How to get string length of given string in c?

1051


Explain how do you search data in a data file using random access method?

1119


What are the valid places to have keyword “break”?

1080


What kind of structure is a house?

1031


What is a macro in c preprocessor?

1087


Describe the header file and its usage in c programming?

1047


What is non linear data structure in c?

1008


Does * p ++ increment p or what it points to?

1105


How can I split up a string into whitespace-separated fields?

1046