Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   What is the concept of padding? (http://www.go4expert.com/forums/concept-padding-t7403/)

Kailash 20Nov2007 11:32

What is the concept of padding?
 
Can any one tell what is the concept of padding in c and c++.

and how much space following user defined variable will take:
Code:


struct num
{
int n;
char ch;
int p;
}

struct num
{
int n;
int p;
char ch;
}

struct num
{
char ch;
int n;
int p;
}

also tell me how the concept of padding is applying in these cases.

shabbir 20Nov2007 17:40

Re: What is the concept of padding?
 
Refer About Memory Alignment


All times are GMT +5.5. The time now is 08:57.