How to write a C String

#include <stdio.h>
int main (void)
{
    char s[100];
    int i;
    printf("Enter a string: ");
    gets(s);
    for(i=0;s[i];i++)
    {
        printf("%c",s[i]);
    }
    system("pause");
    return 0;
}

0 comments:

Post a Comment