I tried malloc an array in palindrome() and then after getting the output I wanted, I free it and recursively call palindrome() again.
Sad to say, it's not working. :frown:
Type: Posts; User: xbfish
I tried malloc an array in palindrome() and then after getting the output I wanted, I free it and recursively call palindrome() again.
Sad to say, it's not working. :frown:
I will ask them if I am able to use loop for filling array. It makes me look stupid now. LOL!
I already tried malloc-ing the array and free it in palindrome. Still won't works :(
Yeah, I am not allowed to use a loop to construct. The school is damn stupid. There are so many recursion...
Thanks for the diagnostic!
The stacks is too deep and it is running out of memory. :frown:
Error as shown in gdb:
10985
You can tried the input of 0 to 654321 :) It will fails.
This is for school work. I am restricted to using recursive. :(
Hey guys, I am having segmentation fault on recursive function @ int fill_array(). If I enter number like 0 to 16100, the program works fine. For any integer > 16100, the program crashes.
I am...
Nice online resources! Save my day ! =)
Thanks for your fast reply! :)
The link @ Cprogramming.com FAQ > Why it's bad to use feof() to control a loop was very helpful indeed.
Thanks! Now i know why. LOL!
Hi guys, am new in C programming. I don't understand the following:
In the below code snippet, input.txt is 30 bytes. When I run the program, output.txt is 31 bytes.
FILE *fp, *new_fp;...