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 / sunil

When the parameter is a datatype.
For Eg: sizeof(int), sizeof(double)
#define GetSize(x) (char*)((x*)10 + 1) - (char*)10


When the parameter is a variable.
For Eg: int a;
float b;
sizeof(a), sizeof(b)
#define GetSize(x) (char*)(&x + 1) - (char*)&x

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we increase size of array in c?

964


Differentiate between null and void pointers.

1162


Explain how do you sort filenames in a directory?

1036


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

2018


What is non linear data structure in c?

1018


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2328


What is string function in c?

978


What does double pointer mean in c?

1163


What are enums in c?

1196


Can we access the array using a pointer in c language?

1044


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1716


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1521


How many loops are there in c?

1107


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

1326


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5463