Question: Write a C program to run on ocelot which will flip a single bit in a number entered by the user using the binary representation

 Write a C program to run on ocelot which will flip

Write a C program to run on ocelot which will flip a single bit in a number entered by the user using the binary representation of the number. The user should input the original integer value between 1 and 1000 inclusive using a scanf. Output is to the screen. You must use a bitwise operator for this program. For this assignment give the user directions asking them to enter the integer and then ask them which bit to flip. That can be a number between 0 and 31. Prompt the user for what should be entered each time. After completing the operation ask the user if they want to do another operation again. The user would enter Y or y to do it again. You do not need to use getopt for this program If the user enters a 1 as the initial value and a O for the bit to switch the result would be 0. If the user enters a 10 as the initial value and a 1 for the bit to switch then the result would be 8.. If the user enters a 10 as the initial value and a 2 for the bit to switch then the result would be 14 The program should compile to create an executable called bitswitch Submit your c file and your Makefile in one zip file called FirstnameLastnameL4.zip If the program does not compile and do something useful when it runs it will not earn any credit

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!