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 abc
{

unsigned int a;
char b;
float r;
};
struct xyz
{
int u;
struct abc tt;
}ww;
ww = (struct xyz*)malloc(sizeof(struct xyz));
will the memory be allocated for the inner structure also?



struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww;..

Answer / sadanand

Yes. when sizeof(xyz) is done. it will compute size of
struct abc + size of int

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Interview Questions

What are the two forms of #include directive?

0 Answers   Aspire, Infogain,


how to multiply two number taking input as a string (considering sum and carry )

2 Answers   Wipro,


How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?

2 Answers  


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

0 Answers   TCS,


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

0 Answers  


int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?

7 Answers   Parimal, Wipro,


Why c language?

0 Answers  


What are the differences between new and malloc in C?

0 Answers   Amazon,


Write a C program that reads a series of strings and prints only those ending in "ed"

2 Answers   Accenture,


What is #include stdio h?

0 Answers  


Explain what is the general form of a c program?

0 Answers  


sqrt(x+sqrt(x+sqrt(x+sqrt(x))))=2; Find the value of x?

4 Answers   Subex,


Categories