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 many types of functions are there in c?

1227


simple program of graphics and their output display

2052


What are pointers?

1162


What is difference between static and global variable in c?

1103


How can I write a function that takes a format string and a variable number of arguments?

1104


What is c mainly used for?

1120


Write a program to print factorial of given number without using recursion?

1048


What does the message "automatic aggregate intialization is an ansi feature" mean?

1245


What is a union?

1093


Is c call by value?

1080


What is modifier & how many types of modifiers available in c?

1074


What is pointer and structure in c?

1283


difference between native and cross compilers

2173


What are the differences between Structures and Arrays?

1273


How many keywords (reserve words) are in c?

1192