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

How can I generate floating-point random numbers?

1203


Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.

2286


What is typedef struct in c?

1096


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

1109


Is there a way to compare two structure variables?

1172


What is p in text message?

1038


What is keyword with example?

1123


What is your stream meaning?

1336


Can variables be declared anywhere in c?

1149


What is the difference between if else and switchstatement

2004


What does it mean when the linker says that _end is undefined?

1148


Explain what is wrong with this program statement? Void = 10;

1313


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2533


Is this program statement valid? INT = 10.50;

1231


What do mean by network ?

1217