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

#include <stdio.h>
int main(){
printf("%d\n",((int*)0 + 1));
}

We can replace int with any other type
(Built-in/user-defined ) to get the size.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the role you expect in software industry?

2201


Explain the ternary tree?

1078


Why does everyone say not to use gets?

1200


What is the use of extern in c?

1148


how we can make 3d venturing graphics on outer interface

4901


What does the error message "DGROUP exceeds 64K" mean?

1277


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1944


program for reversing a selected line word by word when multiple lines are given without using strrev

2538


What is the function of this pointer?

1458


What’s the special use of UNIONS?

1205


The file stdio.h, what does it contain?

1215


What is the use of function overloading in C?

1216


What is void main () in c?

1250


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2696


how can I convert a string to a number?

1138