fork(3) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int palindrome(char str[], int length)
  5. {
  6. if (*str == str[length - 1])
  7. palindrome(str + 1, length - 1);
  8. else
  9. return false;
  10. return true;
  11. }
  12.  
  13. int main() {
  14. char a[7] = "xaxecar";
  15. cout << palindrome(a,7);
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 3096KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:14:14: error: initializer-string for array of chars is too long [-fpermissive]
  char a[7] = "xaxecar";
              ^
stdout
Standard output is empty