Here is my code:
#include<stdio.h>
#include<string.h>
int string_length(char s[]);
main()
{
        char s[50];
        int l;
        printf("Enter the string\n");
        scanf("%s\n",s);
        l=strlen(s);
        printf("Length of string = %d\n",l);
}
int string_length(char s[])
{
        int i;
        i=0;
        while(s[i] != '\0')
                ++i;
                return i;
}
After compile it scan for two input values.
What's wrong with my code?
 
     
     
     
     
     
     
     
    