Advertisement
ZinedinZidan

string length

Dec 7th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. int main()
  5. {
  6.   char str1[]="Jamir Uddin Zidan";
  7.   int i=0,len=0;
  8.   while(str1[i]!='\0')
  9.   {
  10.     i++;
  11.     len++;
  12.   }
  13.   printf("Length = %d\n",len);
  14.  
  15.  
  16.   return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement