Advertisement
gihanchanaka

Untitled

May 9th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. /*Problem 10 GROUP 3*/
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6. int equalCharCount(char* s,char* ss){
  7.     if((*s)=='\0')return 0;
  8.     if((*ss)=='\0')return 0;
  9.     if((*s)!=(*ss)) return 0;
  10.     return 1+equalCharCount(s+1,ss+1);
  11. }
  12.  
  13. int main(){
  14.     printf("%d\n",equalCharCount("hellhaffoHowAreYou","hellhaffaj"));
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement