The answer is Tags, sorry about putting the other answer misread question.
Answer:
To allow user to assign rating
Explanation:
The basic function of “rate” command is to give opportunity to the user to assign a value to a song from the range of 1 – 5.
In the range, the value of 1 indicates the lowest rating, while value of 5 is the highest rating that can be obtained.
Any previous ratings are then replaced by the new rating assigned from the range of 1 – 5.
Answer:
A goal of procedural programming
An advantage of object oriented programming
A disadvantage of object oriented programming
A drawback of procedural programming
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.