Saturday, October 22, 2011

solution of balagurusamy of chapter 8.3

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char a[30], b[30];
int i,j,k,l=0;
gets(a);
printf("Enter the range:\n");
scanf("%d %d",&j,&k);
for(i=j-1;i<=k-1;++i)
{
b[l]=a[i];
++l;
}
b[l]='\0';
printf("Output:\n");
puts(b);
getch();
}

No comments:

Post a Comment