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]
2 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]2 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
Read the following example cover letter:
enot [183]

Answer:

All should be added.

Explanation:

All of these are important to your cover letter to make it seem professional.

Hope this helped

3 0
3 years ago
Read 2 more answers
Distinguish<br> between formal and Informal<br> Information System<br> Information systems
Harlamova29_29 [7]

Explanation:

Formal; A formal information system is based on

the organization represented by the organization chart.

Informal; The informal information system is

employee based system designed

to meet personal and vocational needs

and to help in solution of work-related problems.

5 0
2 years ago
a ____ is a feature that finds a list potential design problems associated with your document brainly.com
andrezito [222]
1. eliminating some diseases
2. improving certain species (like growing bigger apples)

8 0
3 years ago
Streaming media known as _____ is stored on the provider's server, which allows you to play the media multiple times. To watch v
const2013 [10]

Strеaming mеdia knοwn as Οn-dеmand is stοrеd οn thе prοvidеr’s sеrvеr, which allοws yοu tο lay thе mеdia multiplе timеs.

Tο watch vidеο οn a cοmputеr, yοu nееd spеcial hardwarе plus sοftwarе knοwn as a Mеdia playеr.

Graphics that hеlp a viеwеr knοw whеn οnе scеnе еnds and anοthеr bеgins arе callеd Transitiοns.  

Mеdia playеr - Sοftwarе that "plays" audiο, vidеο οr animatiοn filеs in thе cοmputеr. In thе Windοws wοrld, Windοws Mеdia Playеr is thе dеfault playеr frοm Micrοsοft, but iTunеs, RеalPlayеr and οthеr sοftwarе arе alsο widеly usеd.

In vidеο еditing a transitiοn is what thе authοr shοws bеtwееn twο shοts οr clips. Thе jοining οf thοsе clips is thе transitiοn frοm οnе tο thе οthеr. Transitiοns can bе an instant scеnе οr imagе changе, a fadе, fadе tο black, dissοlvе, pan frοm οnе pеrsοn tο anοthеr, οr any digital еffеct.

4 0
3 years ago
True or false As the contents and topics of new magazines change year-to-year, you can see various trends and movements across s
Tamiku [17]

the short answer is true.

The long answer is that magazines can help shape and invent new trends.  like they have time and time again in the past.

Hope this helps

-scav

8 0
3 years ago
Other questions:
  • Create a story that depicts the events leading up to a vehicle crash fatality, the crash itself, and the emotional aftermath on
    9·1 answer
  • In DTP, a good rule of thumb is to use as many special effects as you need to make your documents look interesting.
    5·1 answer
  • What is the problem with the code snippet below? public class Test { public static void main(String[] args) { System.out.println
    6·1 answer
  • How does the post process alert the user if it detects a hardware problem during the post process?
    6·1 answer
  • Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB
    9·1 answer
  • Microsoft Excel is an example of a(n) application.
    11·2 answers
  • Hey good to mett you
    15·1 answer
  • Ken has discovered that a vice president of his company has been using his computer to send data about a new product to a compet
    15·1 answer
  • When using for loops and two-dimensional arrays, the outside loop moves across the ___________ and the inside loop moves across
    7·1 answer
  • What are the difference among the whole note, half note and quarter note ? (this is music)
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!