#include <stdio.h>
#include <conio.h>
void main()
{
char a[30];
int i,n,n1;
clrscr();
printf("\n enter the String : ");
scanf("%[^\n]",a);
printf("\n extract start: ");
scanf("%d",&n);
printf("\n extract how many : ");
scanf("%d",&n1);
printf("\n extarct charecter are : ");
for(i=n-1;i<n1+n-1;i++)
{
printf("%c",a[i]);
}
getch();
}
/*
******
OUTPUT
******
enter the String : CPROGRAMMING
extract start: 3
extract how many : 4
extarct charecter are : ROGR
*/