Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

String length (strlen)

a guest Mar 13th, 2018 61 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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