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 / abhishek pathak mnnit

#include <stdio.h>
#define sizeof(x) ((void *)(&x + 1) - (void *)(&x))
void main()
{
int a;
printf("int size=%d",sizeof(a));
}

Is This Answer Correct ?    3 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of pointers used in c language?

994


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1955


Why do some versions of toupper act strangely if given an upper-case letter?

1034


Why is c so powerful?

1061


Does c have enums?

1026


Describe the order of precedence with regards to operators in C.

1000


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1103


Can true be a variable name in c?

985


Give basis knowledge of web designing ...

1980


What is keyword in c?

960


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1884


What is a list in c?

982


Write a progarm to find the length of string using switch case?

2025


What is a stream in c programming?

1078


What is the difference between text and binary modes?

1124