(2) int x, y; Assume x has been set to some unknown value. Perform the indicated operation on x and assign the value to

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

(2) int x, y; Assume x has been set to some unknown value. Perform the indicated operation on x and assign the value to

Post by answerhappygod »

2 Int X Y Assume X Has Been Set To Some Unknown Value Perform The Indicated Operation On X And Assign The Value To 1
2 Int X Y Assume X Has Been Set To Some Unknown Value Perform The Indicated Operation On X And Assign The Value To 1 (15.85 KiB) Viewed 36 times
In C please, thank you
(2) int x, y; Assume x has been set to some unknown value. Perform the indicated operation on x and assign the value to y. Example: Set bits 0 and 7 of x Example: Clear bits 0 and 7 of x Answer: y = x & ~0b10000001; Answer: y = x | 0b10000001; Example: Shift x right 2 places Answer: y = x >> 2; (a) Set bits 2 and 6 of x. (b) Clear bits 0, 3, 4, and 7 of x. (c) Toggle bits 1, 3, 5, and 7 of x. (d) Toggle all the bits of x. (e) Shift x left three bits.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply