prev | Character Arrays: 79.Copy a string array (12.05.2010) /* Program# 79 date : 28-12-2008 Copy one string array into another */ #include <stdio.h> main(){ char a[100],b100]; int i; i=0; scanf("%c",&a[i]); while(a[i]!='$'){ i++; scanf("%c",&a[i]); } a[i]='\0'; i=0; while(a[i]!='\0'){ b[i]=a[i]; i++; } b[i]='\0'; printf("\n %s %s",a,b); } |
next |