Advertisement
gihanchanaka

Untitled

May 9th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.16 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int len(char* string){
  4.     if(string[0]=='\0') return 0;
  5.     return 1+len(&string[1]);  
  6. }
  7.  
  8. int main(){
  9.     printf("%d\n",len("WORD HERE"));
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement