struct X
{
int x,y;
char c;
};
main()
{
struct X x,*px;
px=&x;
printf("%d",*px );
}
I think the above piece of code printf produces a UB since it is expecting and we are providing it with a variable of type struct X.
i just need a confirmation on this so that i can post some more doubt on UB.
{
int x,y;
char c;
};
main()
{
struct X x,*px;
px=&x;
printf("%d",*px );
}
I think the above piece of code printf produces a UB since it is expecting and we are providing it with a variable of type struct X.
i just need a confirmation on this so that i can post some more doubt on UB.
Comment