Guest User

Untitled

a guest
Oct 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. bool pal(char* buffer, int b, int f){
  2.     if(f<b){
  3.         return 1;
  4.     }
  5.     if(buffer[b]==buffer[f]){
  6.         return pal(buffer, b++, f--);
  7.     }
  8.     return 0;
  9.  
  10. }
  11. int main(){
  12.     char* pal="bob";
  13.     return pal(pal, 0, strlen(pal)-1);
  14. }
Add Comment
Please, Sign In to add comment