string length

#include <stdio.h>
#include <string.h>

int main()
{
  char arr[1000];
  int length;

  printf("Enter a string whose length is to be calculated :\n");
  gets(arr);

  length = strlen(arr);

  printf("Length of the string = %d\n", length);

  return 0;
}

OUTPUT : - 






For Other Programs Visit The WebSite:-   https://www.techapurba.com/

Follow Me On Social Media :-

For tech related videos visit my other website :- https://apurbatechinfo.blogspot.com/

Post a Comment

0 Comments