subject
Computers and Technology, 22.04.2021 22:20 AT3P

Write a program to set bits within a range of bits to 1s for an unsigned int num1. Read in num1, start bit, and end bit. Display num1 in binary form before and after setting those bits. Note: you can use `%u` instead of `%i` to print an unsigned int. Example Output Enter a number here: 478 00000000000000000000000111011110 Enter the start bit (1-31) 20 Enter the end bit (1-31) 18 The result: 1835486 00000000000111000000000111011110

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
You know the right answer?
Write a program to set bits within a range of bits to 1s for an unsigned int num1. Read in num1, sta...
Questions
question
English, 13.08.2021 14:00
question
English, 13.08.2021 14:00
question
English, 13.08.2021 14:00
question
Physics, 13.08.2021 14:00
question
History, 13.08.2021 14:00
question
Social Studies, 13.08.2021 14:00
Questions on the website: 13722363