R
Rajesh S R
Consider the following code
int main()
{
struct name
{
long a;
int b;
long c;
}s={3,4,5},*p;
p=&s;
printf("%d",*(int *)((char *)p+(unsigned int)&(((struct name*)0)-
(unsigned int)&(((struct name*)0)->b)
Is the above expression valid according to C99?
That is, Can we have a null pointer as an operand of postfix operator-
Thanks in advance for the reply.
int main()
{
struct name
{
long a;
int b;
long c;
}s={3,4,5},*p;
p=&s;
printf("%d",*(int *)((char *)p+(unsigned int)&(((struct name*)0)-
}b)));
(unsigned int)&(((struct name*)0)->b)
Is the above expression valid according to C99?
That is, Can we have a null pointer as an operand of postfix operator-
Thanks in advance for the reply.