sachinkp21587
Member level 2
- Joined
- Mar 15, 2010
- Messages
- 51
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- india (U.P.)
- Activity points
- 1,703
according to me the following code structure should take 6 byte i.e. (3bits *16variable)/8bits but in practical case its taking 8 bytes.
how?
i am using mplab c18
even if i am trying
Then if unsigned int is 16 bits thn it should take 2 bytes, but its taking 3 bytes. Why?
how?
i am using mplab c18
struct {
unsigned int audio1 : 3;
unsigned int audio2 : 3;
unsigned int audio3 : 3;
unsigned int audio4 : 3;
unsigned int audio5 : 3;
unsigned int audio6 : 3;
unsigned int audio7 : 3;
unsigned int audio8 : 3;
unsigned int audio9 : 3;
unsigned int audio10 : 3;
unsigned int audio11 : 3;
unsigned int audio12 : 3;
unsigned int audio13 : 3;
unsigned int audio14 : 3;
unsigned int audio15 : 3;
unsigned int audio16 : 3;
} MutingDelay;
even if i am trying
struct {
unsigned int audio1 : 3;
unsigned int audio2 : 3;
unsigned int audio3 : 3;
unsigned int audio4 : 3;
unsigned int audio5 : 3;
}MutingDelay;
Then if unsigned int is 16 bits thn it should take 2 bytes, but its taking 3 bytes. Why?
Last edited: