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 / mazhar shaikh

datatype a,*p,*q;
p=&a;
q=p+1;
cout<<abs(int(p)-int(q))<<endl;

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

is it possible to create your own header files?

1164


What does #pragma once mean?

1207


How can I manipulate individual bits?

1099


while initialization of array why we use a[][2] why not a[2][]...?

2401


What is data type long in c?

1116


Explain the properties of union. What is the size of a union variable

1248


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

2121


What is a pointer in c?

1695


In a byte, what is the maximum decimal number that you can accommodate?

1197


What is structure pointer in c?

1091


What is the use of function in c?

1248


How pointers are declared?

1010


What is maximum size of array in c?

1085


Is main a keyword in c?

1182


How can I ensure that integer arithmetic doesnt overflow?

1254