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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started