the tabs are still not in place. I'll try to explain it by showing a piece of your code as C strings... You have: " for (i = 0; i < n; i++) {\n" " if (!EQUAL(a[i],b[i]))\n" " return -1;\n" it should look more like " for (i = 0; i < n; i++) {\n" "\tif (!EQUAL(a[i],b[i]))\n" "\t return -1;\n" It's entirely possible that you used the 'tab' key and gedit translate it to spaces for you, I'm not familiar with gedit so I don't know if it does that and if there is an option to change behavior. Emacs and vim can do the right thing (the vim command to apply it to a file would be something like ":%s/[ ]\{8}/\t/g". Also; lines 141-143 should be collapsed into a single line, " } else"