Mesure the String Length

#include <stdio.h>
#include <string.h>
int main (void)
{
    char s1[100];
    char s2[100];
    gets(s1);
    gets(s2);
    printf("s1 = %d\ts2 = %d\n",strlen(s1),strlen(s2)); 
    system("pause");
    return 0;
}

0 comments:

Post a Comment