answersLogoWhite

0

#include

#include

main()

{

char a[30],fs[50]="",t[3],sd,ed,x[3],s[3],d[3],y[3];

int i,j,p=0,q=0;

clrscr();

printf("Enter characters to be stuffed : ");

scanf("%s",a);

printf("\nEnter a character that represents starting delimiter : ");

scanf(" %c",&sd);

printf("\nEnter a character that represents ending delimiter : ");

scanf(" %c",&ed);

x[0]=s[0]=s[1]=sd;

x[1]=s[2]='\0';

y[0]=d[0]=d[1]=ed;

d[2]=y[1]='\0';

strcat(fs,x);

for(i=0;i

{

t[0]=a[i];

t[1]='\0';

if(t[0]==sd)

strcat(fs,s);

else

if(t[0]==ed)

strcat(fs,d);

else

strcat(fs,t);

}

strcat(fs,y);

printf("\nAfter stuffing : %s",fs);

getch();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Write a program in c language to implement framing methods like character stuffing?

A program in c language to implement framing methods like character stuffing can be grave sizeCRC-32 and the variable c50.


What is character stuffing in computer network?

In character stuffing tags are used to generate frames.These are the headers using which frames are generated.In this limit of information is moreCharacter Stuffing== Delimit with DLE STX or DLE ETX character flags ==== Insert 'DLE' before accidental 'DLE' in data ==== Remove stuffed character at destination ==


What is byte stuffing in computer networking?

In byte stuffing (or character stuffing), a special byte is added to the data section of the frame when there is a character with the same pattern as the flag. The data section is stuffed with an extra byte. This byte is usually called the escape character (ESC), which has a predefined bit pattern. Whenever the receiver encounters the ESC character, it removes it from the data section and treats the next character as data, not a delimiting flag.


What is character stuffing?

Character stuffing is a type of cyber attack where malicious actors insert additional characters or bytes into fields or packets in an attempt to disrupt data processing or manipulate systems. This can lead to buffer overflow vulnerabilities, data corruption, or unauthorized access to systems. It is often used as a technique to evade detection or gain unauthorized access to a system.


Byte stuffing program in c?

teri bhen ki.....................


How long do you warm up prepared stuffing?

To reheat prepared stuffing, preheat the oven to 350°F (175°C) and cover the stuffing with foil. Heat it for about 20-30 minutes or until it reaches an internal temperature of 165°F (74°C). Stir occasionally to ensure even heating.


What are the benefits of data stuffing?

The following data fragment occurs in the middle of a data stream for which the byte-stuffing algorithm described in the text is used: A B ESC C ESC FLAG FLAG D. What is the output after stuffing?


How long does it take tobake stuffing?

Baking stuffing typically takes about 30 to 45 minutes at a temperature of 350°F (175°C). If the stuffing is prepared in a casserole dish, you may want to cover it with foil for the first 20 minutes to retain moisture, then uncover it for the last part of cooking to achieve a crispy top. Always ensure the stuffing reaches an internal temperature of 165°F (74°C) for safety.


How do you know when the stuffing is done?

Stuffing is done when it reaches an internal temperature of 165°F (74°C) if cooked separately or in the bird. It should be moist but not soggy, and the texture should be fluffy. If the stuffing is browning on top, it’s a good sign that it’s ready. Always check for even cooking by testing the center of the stuffing.


What is the bit stuffing and why you go for byte stuffing?

in bit stuffing we use data in bits !! in byte stuffing we use char !! thus in byte stuffing first char and converted in binary form and then bit stuffing is applied on it


Wild card character in c plus plus?

There is no wildcard character in C++.


How do you use the word stuffing in a sentence?

The kitten is tearing the stuffing out of the sofa.I want both kinds of stuffing, please!