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...

what is the output of the code and how?

main()
{
int *ptr,x;
x=sizeof(ptr);
printf("%d",x);
}

Answer Posted / veluri.haritha

If a compiler is a 16 bit compiler and its memory model is
tiny or small or compact memory model then the "x" value
will be 2 bytes.

if the memory model is large or huge memory model then the
"x" value will be 4 bytes.

if a compiler is a 32 bit compiler then the also the x value
is 4 bytes
by
V.haritha,not yet joined in B.tech

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a pointer be static?

1032


Is linux written in c?

1002


Explain how can type-insensitive macros be created?

962


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

1143


What does != Mean in c?

1001


Which is best book for data structures in c?

1057


How are Structure passing and returning implemented by the complier?

1128


Wt are the Buses in C Language

3173


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1090


Is anything faster than c?

975


What is p in text message?

949


Is multithreading possible in c?

959


Is swift based on c?

1062


What does emoji p mean?

1057


Apart from dennis ritchie who the other person who contributed in design of c language.

1340