c code for character stuffing
#1

#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<process.h>
void main()
{
int i=0,j=0,n,pos;
char a[20],b[50],ch;
clrscr();
printf("enter string\n");
scanf("%s",&a);
n=strlen(a);
printf("enter position\n");
scanf("%d",&pos);
if(pos>n)
{
printf("invalid position, Enter again :");
scanf("%d",&pos);
}
printf("enter the character\n");
ch=getche();

b[0]='d';
b[1]='l';
b[2]='e';
b[3]='s';
b[4]='t';
b[5]='x';
j=6;
while(i<n)
{
if(i==-1)
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]=ch;
b[j+4]='d';
b[j+5]='l';
b[j+6]='e';
j=j+7;
}
if(a[i]=='d' && a[i+1]=='l' && a[i+2]=='e')
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
j=j+3;
}

b[j]=a[i];
i++;
j++;
}
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]='e';
b[j+4]='t';
b[j+5]='x';
b[j+6]='\0';
printf("\nframe after stuffing:\n");
printf("%s",b);
getch();
}
----BY SUSH Big Grin
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: bit stuffing program, bit stuffing data link layer, program of bit stuffing, character stuffing framing method program, implementation of data link layer framing method using character stuffing, vhdl code for bit stuffing, bit stuffing using java with tcp,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  line word and character segmentation matlab code 1 1,044 11-04-2017, 12:59 PM
Last Post: jaseela123d
  matlab code for adaptive differential pulse code modulation 1 1,129 04-04-2017, 11:49 AM
Last Post: jaseela123d
  force pen airborne character recognition system using inertial i2c mems sensor pdf 1 769 15-03-2017, 03:05 PM
Last Post: jaseela123d
  matlab program for segmentation of line word or character 5 2,808 25-04-2016, 12:26 PM
Last Post: dhanabhagya
  iris code matlab code 1 1,220 17-09-2015, 01:55 PM
Last Post: seminar report asees
  optimal location placement power system distributed generation gams code matlab code 1 926 04-09-2015, 02:05 PM
Last Post: seminar report asees
  in computer networks character count program in c 2 2,314 10-07-2015, 02:16 PM
Last Post: seminar report asees
  line word and character segmentation matlab code 1 843 06-07-2015, 02:22 PM
Last Post: seminar report asees
  matlab code for brain tumor detection using matlab code 1 1,441 27-04-2015, 02:27 PM
Last Post: seminar report asees
  source code ns2 code for saodv 0 905 30-09-2014, 12:59 PM
Last Post: Guest

Forum Jump: