Monday, May 25, 2015

string(8)

#include <stdio.h>
///copy a string to another string

int main()
{
    char ch[15],ch1[15];
    int i;
    scanf("%s",ch);
    for(i=0;ch[i]!='\0';i++)

    ch1[i]=ch[i];
    ch1[i]=ch[i];
    printf("%s",ch1);

    return 0;
}

No comments:

Post a Comment