subject

Write a C program that reads two hexadecimal values from the keyboard and then stores the two values into two variables of type unsigned char. Read two int values p and k from the keyboard, where the values are less than 8. Replace the n bits of the first variable starting at position p with the last n bits of the second variable. The rest of the bits of the first variable remain unchanged. Display the resulting value of the first variable using printf %x. Test Cases:n = 3;p=4;input: a= 0x1f (0001 1111) b = c3 (1100 0011); output: f (0000 1111)n = 2;p=5;input: a= 0x1f (0001 1111) b = c3 (1100 0011); output: 3f (0011 1111)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 18:30
*write a program that defines symbolic names for several string literals (chars between quotes). * use each symbolic name in a variable definition. * use of symbolic to compose the assembly code instruction set can perform vara = (vara - varb) + (varc - vard); ensure that variable is in unsigned integer data type. * you should also further enhance your symbolic logic block to to perform expression by introducing addition substitution rule. vara = (vara+varb) - (varc+vard).
Answers: 1
question
Computers and Technology, 25.06.2019 08:00
Which of the following statements is true of an intranet? it is a network where a computer is connected to the internet and acts as a gateway for other devices.it is a widely available public network of interconnected computer networks.it is a network that covers a wide area with the of rented telecommunication lines.it is a network within an organization that uses internet protocols and technologies.
Answers: 3
question
Computers and Technology, 25.06.2019 08:00
Aresearcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use. direct identifiers will not be collected; however, ip addresses may be present in the data set. risk of harm should be evaluated by: solely by the magnitude or severity of expected harm. both the magnitude (or severity) and the probability (or likelihood) of harm. solely by the probability of expected harm. neither the magnitude or probability of harm.
Answers: 3
question
Computers and Technology, 25.06.2019 13:00
True or false the internet is a local communication network that allows only certain computers to connect and exchange information.
Answers: 2
You know the right answer?
Write a C program that reads two hexadecimal values from the keyboard and then stores the two values...
Questions
Questions on the website: 13722362