1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
serious [3.7K]
3 years ago
7

Write a C program to run on ocelot which will either set or clear 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. Use an unsigned integer type. Output is to the screen. You must use only bitwise operators for this program. You can shift bits and or use the logical bitwise operators. For this assignment give the user directions asking them to enter the integer and then ask the user if he or she wants to clear or set a bit. Then ask the user which bit to set or clear. That can be a number between 0 and 31. Prompt the user for what should be entered each time. Be sure to validate all user input so the program cannot be crashed. After completing the operation ask the user if they want to do the entire operation again. The user would enter Y or y to do it again. This would be the entire operation from entering the first integer. You do not need to use getopt for this program
Computers and Technology
1 answer:
devlian [24]3 years ago
6 0

Answer:

Explanation:

Y just like that

You might be interested in
Write a recursive, int -valued function, len, that accepts a string and returns the number of characters in the string .
vodka [1.7K]
Without knowing the language, it's pretty imposible to write it.  Once you start thinking recursively, it's not a difficult problem.

While you're recursing, pass the string without the first character.
The base case would be a null string which would return 0.
The unwind would just add one and return that.
7 0
3 years ago
Circular errors are caused by adding the cell name of _______ cell to its own formula.
Sati [7]

Circular errors are caused by adding the cell name of the active cell to its own formula.

8 0
3 years ago
What was a result of george washington's belief in the sovereignty of the people instead of monarchy?
Ilya [14]
<span>George Washington's belief in the sovereignty of the people instead of monarchy led him to reject a third term as president.</span>
8 0
3 years ago
Write a MATLAB program using afor loopto determine the number of values thatarepositive, the number of values that are negative,
murzikaleks [220]

Answer:

see description

Explanation:

clicking in new script, we type the following:

%inputs and variables

N = input('Enter N : ');

values = input('Enter values : ');

positive=0;

negatives=0;

zero=0;

%for loop

for c = 1:N

   if values(c) > 0

       positive = positive + 1;

   elseif values(c) < 0

       negatives = negatives + 1;

   else

       zero = zero + 1;

   end

end

positive

negatives

zero

so we basically loop the array and add one to counters each time we read an element from the input, for example if we enter:

Example input

Enter N : 5

Enter values : [1,-1,0,2,352]

positive = 3

negatives = 1

zero = 1

7 0
3 years ago
Give an original idea for an app idea to do with sports, please.
BlackZzzverrR [31]
Maden Mobile is an app for sports :)
5 0
4 years ago
Other questions:
  • To copy consecutive items, click the first item in the group, hold down _______, and click the last item
    7·2 answers
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • AT&amp;T reacted to the popularity of the cellular phone by adding several cellular models to its line of regular phones. Availa
    8·1 answer
  • Which principle suggests that specific single responsibility interfaces are better than one general purpose interface?
    13·1 answer
  • Explain how signal detection theory can be used to analyze web site reading and searching. Based on this analysis, provide three
    14·1 answer
  • Rachel is a junior system administrator for a network with a single Active Directory domain. The network has just expanded to in
    6·1 answer
  • Question # 4
    5·1 answer
  • The Ingenuity and the MOXIE are two new pieces of technology on the Perseverance. What role will these instruments play? How wil
    6·2 answers
  • hi, I want to ask how do I change the Brainly to another country?, because I pressed the wrong Brainly button to my country​
    6·2 answers
  • on early ethernet networks, all computers were connected to a single wire, forcing them to take turns on a local area network (l
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!