Code Scrappers


Length of string using library function C program


              #include<stdio.h>
              #include<stdlib.h>

              void main()
              {
                  char s[20];

                  int length;

                  printf("\n enter string : ");

                  scanf("%s", s);

                  length = strlen(s);

                  printf("\n length of string : %d", length);

              }


          



Output

    enter string : coding

    length of string : 6