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 / subham singh

1 #include<iostream>
2 using namespace std;
3 main()
4 {
5 int i;
6 int* p = &i;
7 int* q= p;
8 p++;
9 cout<<(char*)p-(char*)q<<endl;
10 }
11
~

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of 'auto' keyword

1085


Explain what is the benefit of using #define to declare a constant?

1111


What is the purpose of 'register' keyword in c language?

988


Is struct oop?

969


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

968


What is 2 d array in c?

968


What is clrscr ()?

1069


Is c pass by value or reference?

1002


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1056


What is the significance of scope resolution operator?

1362


Write the control statements in C language

1145


What are the functions to open and close file in c language?

1144


provide an example of the Group by clause, when would you use this clause

2139


What are different types of operators?

994


Explain what math functions are available for integers? For floating point?

1073