137. Program to find length of a given string.

 #include<stdio.h>

char a[10],i;

void main()

{

    printf("Enter a string : ");

    scanf("%s",a);

    for(i=0;a[i]!='\0';i++);

    printf("%d",i);

}

Comments