daily pastebin goal
53%
SHARE
TWEET

String length (strlen)

a guest Mar 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.    char str[150];
  6.    int length;
  7.  
  8.    printf("\n Enter the String : ");
  9.    gets(str);
  10.    length = 0;  
  11.    while (str[length] != '\0')
  12.       length++;
  13.  
  14.    printf("\n Length of the String is : %d", length);
  15.    return(0);
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top