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

How are variables declared in c?

1103


How to draw the flowchart for structure programs?

9343


What is sizeof c?

1077


What is a newline escape sequence?

1103


State the difference between x3 and x[3].

1112


What is the difference between near, far and huge pointers?

1099


What is the function of multilevel pointer in c?

1087


What is the use of structure padding in c?

1072


Explain the ternary tree?

1026


why wipro wase

2313


What is the difference between a function and a method in c?

1085


What is .obj file in c?

1085


Define circular linked list.

1031


Distinguish between actual and formal arguments.

1085


write a program for the normal snake games find in most of the mobiles.

2258