when supplied 0, would print 1, and on being supplied 1
would 0. You are not to use, bit wise operators, i conditions, ternary operators. Below is my attempt at it.
#include
#include
int main(int argc, char *argv[])
{
struct packed_struct {
unsigned int f:1;
} pack;
pack.f = atoi(argv[1]);
pack.f++;
fprintf(stderr, " %d \n", pack.f);
return 0;
}
This works for me ;-)
1 comment:
add some thing
Post a Comment