gihanchanaka

Untitled

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