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 what is dynamic data structure?

1118


explain what are pointers?

970


Why doesnt the call scanf work?

1140


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

1174


Is there a way to compare two structure variables?

1061


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1783


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1016


What is #include conio h?

947


If null and 0 are equivalent as null pointer constants, which should I use?

1122


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1971


What does *p++ do? What does it point to?

1007


What is the difference between ā€˜g’ and ā€œgā€ in C?

3913


How can I swap two values without using a temporary?

1063


How is pointer initialized in c?

979


Why is sizeof () an operator and not a function?

987