prev


Character Arrays - String manipulations:

81.Copy left n characters from m position(13.05.2010)

/*
Program# 81
date : 28-12-2008
Copy left 'n' char from 'm' position
*/

#include <stdio.h>
main(){
char a[100],b[100];
int i,n,j,m;

i=0;
scanf("%c",&a[i]);
while(a[i]!='$'){
i++;
scanf("%c",&a[i]);
}
a[i]='\0';
scanf("%d",&n);
scanf("%d",&m);
i=m;
j=0;
while(a[i]!='\0' && j



next
blog comments powered by Disqus