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

how to find the size of the data type like int,float
without using the sizeof operator?

Answer Posted / amit prakash

main()
{
int a;
int *aa,*bb;
int size;
aa = &a;
bb=aa;
bb++;
size=bb-aa;
printf("\nsize_of_int:%u",size) ; // actual size but
depends upon compiler
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I pad a string to a known length?

994


List some of the static data structures in C?

1171


What is a struct c#?

1020


what is reason of your company position's in india no. 1.

2274


What is "Hungarian Notation"?

1056


What does sizeof function do?

1152


Why does everyone say not to use scanf? What should I use instead?

1390


Differentiate between full, complete & perfect binary trees.

1070


What are the types of c language?

1010


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2710


What is unary operator?

1067


What are the salient features of c languages?

1073


What is a char in c?

954


Is malloc memset faster than calloc?

1032


How was c created?

1013