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
SOVA2 [1]
3 years ago
9

Program for bit stuffing...?

Computers and Technology
1 answer:
Olegator [25]3 years ago
4 0

Answer: Program for bit stuffing in C

#include<stdio.h>

      int main()

    {    

          int i=0,count=0;

          char data[50];

          printf("Enter the Bits: ");

          scanf("%s",data);            //entering the bits ie. 0,1  

          printf("Data Bits Before Bit Stuffing:%s",databits);

          printf("\nData Bits After Bit stuffing :");

          for(i=0; i<strlen(data); i++)

              {

              if(data[i]=='1')

                     count++;

              else

                     count=0;

                printf("%c",data[i]);

             if(count==4)

                {

                          printf("0");

                          count=0;

                 }

             }

    return 0;

 }

Explanation:

bit stuffing is the insertion of non-information bits during transmission of frames between sender and receiver. In the above program we are stuffing 0 bit after 4 consecutive 1's. So to count the number of 1's we have used a count variable. We have used a char array to store the data bits . We use a for loop to iterate through the data bits to stuff a 0 after 4 consecutive 1's.

You might be interested in
Find the number of ways in which a committee of 4 can be chosen from six boys and
natima [27]

Answer:

465 ways

Explanation:

Atleast 1 girl and 1 boy

Possible combinations :

1 girl ; 3 boys = 6C1 ; 6C3

2 girls ; 2 boys = 6C2 ; 6C2

3 girls ; 1 boy = 6C3 ; 6C1

(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)

Combination formula:

nCr = n! ÷ (n-r)!r!

We can also use a calculator :

6C1 = 6

6C3 = 20

6C2 = 15

Hence,

(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)

(6 * 20) + (15 * 15) + (20 * 6)

120 + 225 + 120

= 465 ways

6 0
2 years ago
It is possible to collaborate on a presentation with a group of people using the Internet.
DerKrebs [107]

Answer:

True

Explanation:

4 0
3 years ago
Which statement about synchronous communication is true?
tangare [24]
In general, synchronous communication means you have to wait for the answer all the time. The programming logic is simpler, but the cost that you spend a lot of time waiting.

If the options are:

<span>a. The people communicating don't need to be online at the same time.
b. There is lag time in the communication.
c. The communication occurs in real time.

a is false, you do need to be online to receive the message
b is true, typically you continue only after an acknowledgement
c is true, you wait for acknowledgement that occurs in real time (not necessarily fast though)</span>
3 0
3 years ago
The general syntax to overload the stream extraction operator &gt;&gt; for a class is ____.
Aloiza [94]
Istream& operator>> (istream& input, Example& example)
{
// Extract your data from input stream here
return input;
}
5 0
3 years ago
6. Consider a circle of diameter d cm.
blagie [28]

Circles

Area of Circle is \pi d^{2} /4

Total percentage increase in the area of the modified circle is 69%

Explanation:

(a)  Given the diameter of the circle be d

Then the radius of the circle = r = d/2

and the area of the circle is given by:

 

Area(A) = \pi r^{2}  

A = \pi (d/2)^{2}

A = \pi d^{2} /4

The area of circle is \pi d^{2} /4

(b)

The increase in percentage while changing the dimensions is given by the formula  :

Total % increase = a% + b% - (a% * b%)/100

Where ,

a% is the percentage increase in side a

b% is the percentage increase  in side b

Let the percentage increase in radius is : a%

Since a% = b%

So the formula is

Total increase % = a% + a% + (a% * a%)/100

Given here the diameter of the circle increases by 30% so a =30

Therefore, putting the value of a in the formula

Total increase % = 30% + 30% + (30% *30%)/100

Total increase % = 60% + 9%

Total increase % =69%

Therefore the total percentage increase in the area of the modified circle is 69%

8 0
3 years ago
Other questions:
  • __________ involves analyzing a large amount of data to extract knowledge and insight
    13·1 answer
  • ) Consider a router that interconnects four subnets: Subnet 1, Subnet 2, Subnet 3 and Subnet 4. Suppose all of the interfaces in
    11·1 answer
  • 1. Access and PowerPoint are not included in all configurations of Microsoft Office 2013.
    14·1 answer
  • Network a0 is a process by which several protocols evolve to form a single product.
    7·1 answer
  • Lonnie has several workbooks that contain financial and sales data. He needs to ensure that if the data in a single cell in one
    5·1 answer
  • Explain word processing ​
    11·2 answers
  • What is sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum &gt; 4) break; } whi
    8·2 answers
  • Users at UC need to be able to quickly create a Resource record from the Project record's Chatter feed How should the App Builde
    10·1 answer
  • What is the main advantage that a website builder offers for web development?
    9·2 answers
  • Which of the following is an example of a runtime error?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!