Find the length of the string using while loop

Given a string find the length of the string without using library function and using while loop to traverse the string.

#include <stdio.h>
int main(void) {
   char *s;
   int len=0;
   /* Allocate the memory for the input string */
    /* Get the input string from the user */
 /* While the pointer doesn't reach the null character which has the macro constant "0" value */
     /* Increment the length of the character & the pointer to the character */
    /* Print the length of the string */
  printf("length of %s is %d",(s-len),len);
   return 0;