Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago

Question

d. What language(s) did they speak?

Answered: 1 week ago

Question

e. What difficulties did they encounter?

Answered: 1 week ago