Question
Complete the above program so that the output of the program is 101 202. That is, a becomes 101, b becomes 202. You cannot added
Complete the above program so that the output of the program is 101 202. That is, a becomes 101, b becomes 202.
You cannot added new codes, just replace the ?, ??, ???, ????, ?????, ??????.
Consider the code above. Function checkbit(int a, int x) checks if bit-x of a is on (i.e., 1) or off (i.e., 0).
Denote the right-most bit as bit-0. For example, checkbit(10, 2) should print "bit-2 is off", and checkbit(10,3) should print "bit-3 is on"
Complete if statement of the function.
Consider the code above. Assume it is run on a 32 bits system, where pointer has size 4 bytes regardless of type.
List the output of the program (in the order of the program execution).
#includeStep 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