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
djverab [1.8K]
3 years ago
15

Write a C program that right shifts an integer variable 4 bits. The program should print the integer in bits before and after th

e shift operation. Does your system place 0s or 1s in the vacated bits?
Computers and Technology
1 answer:
Sindrei [870]3 years ago
4 0

Solution :

#include<$\text{stdio.h}$>

#include<conio.h>

void dec_bin(int number) {

$\text{int x, y}$;

x = y = 0;

for(y = 15; y >= 0; y--) {

x = number / (1 << y);

number = number - x * (1 << y);

printf("%d", x);

}

printf("\n");

}

int main()

{

int k;

printf("Enter No u wanted to right shift by 4 : ");

scanf("%d",&k);

dec_bin(k);

k = k>>4; // right shift here.

dec_bin(k);

getch();

return 0;

}

You might be interested in
When computing effect size, the sample size is ________.
NNADVOKAT [17]
Sample size  is not taken into account

8 0
3 years ago
PLEASEEEEE HELLPPP IT'S URGENT!!!
Usimov [2.4K]

Answer:

Battery: DC power source to feed electricity in the circuit

Processor: component that reads instructions from memory, executes them and writes result data to memory and output devices

Accelerometer: device that measures motion acceleration along 3 dimenstions

Micro USB Port: standard interface for serial communication and power

Compass: sensor that finds orientation based on earth's magnetic field

•Block Editor: pass

Iteration: one cycle of a program loop

•Selection: pass

Variable: program construct to hold a value that code can read and write to.

Algorithm: programming code with a particular function to transform a given input to an output

Debug: the process of finding and fixing mistakes in your program

4 0
3 years ago
The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
Arisa [49]

Answer:

C. instrument panel

Explanation:

In order to be able to operate your vehicle safely, you must know the functions and locations of all the interior mechanisms of your car.

The instrument panel contains gauges which include the following:

Speedometer, which indicates speed in both miles and kilometers per hour

Tachometer, which indicates rotations in the engine in revolutions per minute (RPMs)

Odometer, which indicates the total number of miles your car has been driven since it was manufactured

Fuel gauge, which shows the fuel level in your car's fuel tank

Oil gauge, which shows oil level

5 0
3 years ago
Take the hypothetical situation that your business is considering a move to the cloud for core systems that contain confidential
zvonat [6]

Answer:

Solutions: to have a non-related to the company account and a back-up system.

Explanation:

My proposal is to move all the information of the bussiness to the cloud for better use of the data.

This data contains confidential health and finantial information and, in order to avoid any information non-wanted exit, the account has to be completing separated from the bussiness name  (more accounts),  by this way, it will be harder for extserns to get in it and substract the confidential information.

Also, the account must have a series of  security blocks to make it harder to  enter.

Finally, in case a virus gets in it and deletes any information, the data must have a backup system that will provide all the needed information in case it goes missing.

8 0
3 years ago
Your company has decided to replace several hundred hard drives. It would like to donate the old hard drives to a local school s
Tanzania [10]

Answer:

Drive Wipe F is correct

Explanation:

Drives content is virtual so it wouldn't work to shred or incinerate it. overwriting it wouldn't work to get rid of files exactly. it might get rid of the files but it would replace the files with other files.

3 0
3 years ago
Other questions:
  • Which sentence best describes an activity stream?
    10·2 answers
  • Mail merge can be used in business to complete which of the following tasks
    15·2 answers
  • Create a query that will list all technician names, employee numbers, and year hired in order by year hired (Newest to Oldest).
    5·1 answer
  • They are correct? thank you!
    5·1 answer
  • The term wiki refers to a(n): Group of answer choices type of short-message blogging, often made via mobile device and designed
    9·1 answer
  • You are working on a program that needs to keep track of many values at the same time. Which of the following would you use?
    10·2 answers
  • after landing, you are tying down the aircraft when a person approaches and asks: "faa. are you the pilot of this aircraft?" wha
    11·1 answer
  • HOW TO CHANGE GRADE IN SKYWARD!!
    10·1 answer
  • Why is internet download speed slower on a computer vs phone
    5·1 answer
  • In which cipher method are values rearranged within a block to create the ciphertext?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!