Posted: Mon Oct 08, 2007 10:25 pm
My IDE is Code::Blocks and my default compiler is gcc and my OS is Windows XP but your bug doesn't depend on operating system or compiler:srrajesh wrote:Thanks a million, for that!saman_saadi wrote: At last I found your bug! yes in my machine your program for 01:20 output 02:22 as Robert Gerbicz's machine. The problem is in isPal function. You forgot add '\0' in str so after str = s; you must add str = '\0'; and you will get AC. Please after getting AC remove your code
Now I got AC!
I really feel embarrassing abt what I had done!!!
Just curious to know, what is ur machine type, OS and compiler?
for more information you can try http://www.cs.cf.ac.uk/Dave/C/node19.html. So your code mabye work correctly or notIt is important to preserve the NULL terminating character as it is how C defines and manages variable length strings. All the C standard library functions require this for successful operation