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...

struct ptr
{
int a;
char b;
int *p;
}abc;
what is d sizeof structure without using "sizeof" operator??

Answer Posted / gagandeep

The total size would be 5.
Since 'int a' takes 2;
'char b' takes 1; and
'int *p' takes 2 (Note: Any pointer variable would take 2 bytes)

There is no additional size of 'struct' data structure.
Hence 5 is the value.

Is This Answer Correct ?    12 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a pointer variable declared?

1023


How can you draw circles in C?

1099


How does normalization of huge pointer works?

1100


What are the 5 types of organizational structures?

1019


Can we change the value of #define in c?

958


What is the symbol indicated the c-preprocessor?

1166


How can a process change an environment variable in its caller?

1128


What is auto keyword in c?

1160


What is the difference between near, far and huge pointers?

1032


show how link list can be used to repersent the following polynomial i) 5x+2

2191


What are pragmas and what are they good for?

936


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

1035


What is the total generic pointer type?

1109


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

2108


Sir i need notes for structure,functions,pointers in c language can you help me please

2350