How bit field store in memory?.Is store left to right or right to left?
example:
struct stud
{
unsigned int x:5;
unsigned int y:5;
unsigned int z:6;
};
struct stud bit={1,3,3};
How o/p of below program is 12.
#include<stdio.h>
#include<conio.h>
void main
{
struct stud
{
unsigned int x:5;
unsigned int y:5;
unsigned int z:6;
};
struct stud bit={1,3,3};
char *p;
clrscr();
p=&bit;
p++;
printf("%d",*p);
}
example:
struct stud
{
unsigned int x:5;
unsigned int y:5;
unsigned int z:6;
};
struct stud bit={1,3,3};
How o/p of below program is 12.
#include<stdio.h>
#include<conio.h>
void main
{
struct stud
{
unsigned int x:5;
unsigned int y:5;
unsigned int z:6;
};
struct stud bit={1,3,3};
char *p;
clrscr();
p=&bit;
p++;
printf("%d",*p);
}