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 / neel patwa

//Nice way to find size of any data type...
#include<iostream.h>
void main(){

int *p=0;
p++;
cout<<"\nSize of int="<<(int)p;
}
Note:U can replace int by other datatpe,
to find size of any data type..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between call by value and call by reference in c language?

1162


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1264


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1247


Lists the benefits of c programming language?

1205


How can I implement a delay, or time a users response, with sub-second resolution?

1120


Write a program to generate the Fibinocci Series

1303


What is extern storage class in c?

1055


Combinations of fibanocci prime series

1666


Under what circumstances does a name clash occur?

1275


Why main function is special give two reasons?

1605


What is pass by value in c?

1134


How is pointer initialized in c?

1093


What is #define size in c?

1267


Where are some collections of useful code fragments and examples?

1196


Explain what header files do I need in order to define the standard library functions I use?

1229