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

a c code by using memory allocation for add ,multiply of sprase matrixes

2809


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1868


Is void a keyword in c?

991


Why main is not a keyword in c?

1260


What is dynamic memory allocation?

1344


What is the difference between variable declaration and variable definition in c?

1065


What does printf does?

1256


Explain the difference between call by value and call by reference in c language?

1115


Write a program for finding factorial of a number.

1092


What are the benefits of c language?

1183


How do we make a global variable accessible across files? Explain the extern keyword?

1884


Why main function is special give two reasons?

1550


Is c is a middle level language?

1070


How can a program be made to print the name of a source file where an error occurs?

1230


What are the disadvantages of c language?

1200