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

Difference between macros and inline functions? Can a function be forced as inline?

1351


Is it better to use malloc() or calloc()?

1176


How will you divide two numbers in a MACRO?

1187


What is "Hungarian Notation"?

1169


Explain how does free() know explain how much memory to release?

1138


Explain what is the advantage of a random access file?

1176


Why C language is a procedural language?

1095


can we change the default calling convention in c if yes than how.........?

2592


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16919


What is file in c language?

1052


What is getch c?

1344


What are structures and unions? State differencves between them.

1254


What is the purpose of scanf() and printf() functions?

1299


Explain what is the best way to comment out a section of code that contains comments?

1189


Explain null pointer.

1196