Question: int y = -2; int z; unsigned int yu = (unsigned int) y; yu = ~yu; yu += 1; z = (int) yu; printf(%d ,

int y = -2;

int z;

unsigned int yu = (unsigned int) y;

yu = ~yu;

yu += 1;

z = (int) yu;

printf("%d ", z);

char y = -2;

char z;

unsigned char yu = (unsigned char ) y;

yu = yu & ~(1<<7);

z = (char) yu;

printf("%x ", z);

can you explaine line by line what the above codes mean. Thank you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!