C Program for SELECT THE CHAR WHICH U WANT
#include stdio.h>
#include conio.h>
void main()
{
void substr(char[], int *, int *);
int a,b;
char ch[20];
clrscr();
printf("ENTER THE STRING: ");
gets(ch);
printf("\nENTER THE POSITION: ");
scanf("%d",&a);
printf("\nEnter The Length: ");
scanf("%d",&b);
substr(ch,&a,&b);
getch();
}
void substr(char ch[20],int *s, int *t)
{
int i;
for(i=*s;i<(*t+*s);i++)
putchar(ch[i]);
}
OUTPUT :
ENTER THE STRING : KAMLESH
ENTER THE POSITION: 2
ENTER THE LENGTH: 3
MLE