#include<stdio.h>
#include<conio.h>
#include<string.h>
void remove(char[],int,int);
main()
{
char a[80];
int s,e;
clrscr();
printf("Enter a string\n");
gets(a);
printf("Enter start\n");
fflush(stdin);
scanf("%d",&s);
printf("Enter end\n");
scanf("%d",&e);
remove(a,s,e);
getch();
return 0;
}
void remove(char a[],int s,int e)
{
int i;
while(a[i]!='\0')
{
for(i=0;i<s&&a[i];i++)
printf("%c",a[i]);
for(i=s;i<=e&&a[i];i++);
for(;a[i]!='\0';i++)
printf("%c",a[i]);
}
}
Subscribe to:
Post Comments (Atom)
Related Post
Array:
String functions:
General (Loops-for/while)
No comments:
Post a Comment