Assume that n and val are int variables. Also assume that thevalue of n is in the range 0 to 31, inclusive. Which of thefollowing statements sets bit n of val to 0, while leaving theother bits of val unchanged?
Choice 1 of 4: val = (val >> n) << n;Choice 2of 4: val = val | (1 << n);Choice 3 of 4: val = val^ (1 << n);Choice 4 of 4: val = val & ~(1 <<n);
Assume that n and val are int variables. Also assume that the value of n is in the range 0 to 31, inclusive. Which of th
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am