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

In a byte, what is the maximum decimal number that you can accommodate?

0 Answers  


Explain the concept and use of type void.

0 Answers  


convert 0.9375 to binary

2 Answers   CTS, TANCET,


being a chemical engineer and with an aggregate of 80% why you opt for TCS and not your core industry?

1 Answers   TCS,


Given a piece of code int x[10]; int *ab; ab=x; To access the 6th element of the array which of the following is incorrect? (A) *(x+5) (B) x[5] (C) ab[5] (D) *(*ab+5} .

2 Answers   Oracle,


When can a far pointer be used?

0 Answers  


Write a factorial program using C.

0 Answers   iNautix,


struct tag{ auto int x; static int y; };main() { struct tag s; s.x=4; s.y=5; printf(ā€œ%dā€,s.x); }

2 Answers   Vector,


what is the output of the following code? main() { int I; I=0x10+010+10; printf("x=%x",I); } give detailed reason

3 Answers  


Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table

3 Answers   Value Labs,


Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }

4 Answers   Subex,


What is the use of getchar functions?

0 Answers  


Categories