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?


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 convert a character into its ascii value?

In C a character already is its ASCII value: char c= 'A'; printf ("%c is %d (0x%x hexa)\n", c, c, 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!


Do you cover stuffing when cooking?

It is important to cover stuffing (dressing) while cooking it. One of the important ingredients to a good stuffing is water, and therefore, it can dehydrate making for a dry stuffing. If cooking stuffing, whether in a container by itself or inside a turkey, cover with aluminum foil. Also, if cooking the stuffing inside the turkey, be sure to baste the stuffing exposed while basting the turkey.