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

write a program for size of a data type without using
sizeof() operator?

Answer Posted / g

This code will work in TC with 2 warnings but can get result

void main()
{
char *Ptr1,*Ptr2;
float fl;
ptr1 = &fl;
ptr2 = (&fl+1);

printf("%u",ptr2-ptr1);
}

This is a way to get the size of data type...waiting for
any other way...

Is This Answer Correct ?    44 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the uses of null pointers?

1085


Is c easy to learn?

971


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1708


What is openmp in c?

1010


provide an example of the Group by clause, when would you use this clause

2177


write a program to find the given number is prime or not

4729


What is the benefit of using an enum rather than a #define constant?

1217


How the c program is executed?

1139


What is the use of putchar function?

1050


What are global variables and how do you declare them?

1073


How to throw some light on the b tree?

1065


How do I read the arrow keys? What about function keys?

1065


How do I swap bytes?

1061


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1083


Explain threaded binary trees?

1142