In pset1, while doing mario, I used \t for space but in output it shows more than one space. I tried to fix it by clicking on "edit" in gedit and reducing tab size to 1, then I resaved and recompiled mario.c but it did not work.

Here is a screenshot of the program output.

  • need to see the code for it, but don't post the code here, its against honor code. If you wish then try mailing me at p.desh31@gmail.com
    – sinister
    Oct 5 '14 at 11:20
  • I figured it out . I just used space in printf function , like printf (" ");Thanks though , sinister .
    – KROM360
    Oct 6 '14 at 15:38
  • 1
    In that case please delete this question as it won't help future visitors.
    – sinister
    Oct 6 '14 at 15:45
  • I think this question is potentially helpful. Deletion is generally reserved for posts much worse than this.
    – Air
    Oct 7 '14 at 20:58

The "tab size" option in gedit only changes how tabs are displayed in the editor window. It has no effect on how the tab character \t gets displayed in the terminal window when you run the program.

It seems to be possible to change the display width of a tab character in your shell environment but I wouldn't recommend it and it won't help you to successfully complete this problem set. The grader doesn't compare your output visually because it's an automated program – even if you got the tabs to appear to be identical to spaces in your copy of the appliance, the grader is only going to compare the raw output string to see if it's identical to the output that it expects. It's going to see \t\t\t\t\t\t\t##\n when it expects a string with space characters instead of tabs, so it's going to mark the output as incorrect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .