Question: Question 1: unsigned char a; a=4; a=~a; What is the value of a? a)16 b)-4 c)72 d)20 e)251 Question 2: 1. #include 2. main(){ 3.

Question 1:

unsigned char a;

a=4;

a=~a;

What is the value of a?

a)16

b)-4

c)72

d)20

e)251

Question 2:

1. #include

2. main(){

3. unsigned char a, b;

4. a = 19;

5. a = a << 2;

6. b = 67;

7. b = b >> 4;

8. printf("%d % d ", a, b);

9. a = (a | b) << 1;

10. a = ~ a;

11. printf("%d ", a);

}

Your answer should look something like this:

Binary value of a in line 4 is:

Binary value of a in line 5 is:

Binary value of b in line 6 is:

Binary value of b in line 7 is:

Printed values of a & b in line 8 is:

Binary value of a in line 9 is:

Binary value of a in line 10 is:

Printed value of a in line 11 is:

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!