Learn C
Coading is not typing it is imagination......
Sunday, July 26, 2015
String_copy
#include <stdio.h>
#include <string.h>
int main()
{
char str1[100], str2[100], i;
printf("\n");
printf("input string : ");
scanf("%s",str1);
for(i=0; str1[i]!='\0';i++)
{
str2[i]=str1[i];
}
str2[i]='\0';
printf("\noutput String: %s\n",str2);
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment