#include <stdio.h>
int main()
{
unsigned int n1 =2147483648,num=15;
int n2=num & n1 >0;
printf("%d",n2);
}
n2=1 but it should be 0 according to me.
#include <stdio.h>
int main()
{
unsigned int n1 =2147483648,num=15;
int n2=num & n1 >0;
printf("%d",n2);
}
n2=1 but it should be 0 according to me.
Copyright © 2021 Jogjafile Inc.
Due to the operator precedence this record
is equivalent to
that is the same as
So the variable
n2is initialized by the value1.Tp get the expected result you need to write
because
n1is internally is represented like (printf( "%#x\n", n1 );)