Afer a few false starts,my initials.program provided correct output for all the cases tested by check 50 when I tried them one by one.. But when I tried to check it with check50 it was not even passing one Test even for one case though it was correctly compiled. Later when I added a new line command the following results have been obtained. I appear to be jharvard@appliance (~/Dropbox/pset2): check50 2014.fall.pset2.initials initials.c :) initials.c exists :) initials.c compiles :) outputs "MB" for "Milo Banana" :) outputs "MB" for "milo banana" :( outputs "RTB" for "Robert Thomas Bowden" \ expected output, but not "RT\nB\n" :( outputs "R" for "ROB" \ expected output, but not "R" :( outputs "RTB" for "Robert thomas Bowden" \ expected output, but not "RT\nB\n" https://sandbox.cs50.net/checks/2ca970050c2b4d2a919289d82b48c004 jharvard@appliance (~/Dropbox/pset2): make initials clang -ggdb3 -O0 -std=c99 -Wall -Werror initials.c -lcs50 -lm -o initials jharvard@appliance (~/Dropbox/pset2):going in circles. Space prevents me from listing all the cases that I have played with printf commands.
jharvard@appliance (~/Dropbox/pset2): check50 2014.fall.pset2.initials initials.c :) initials.c exists :) initials.c compiles :) outputs "MB" for "Milo Banana" :) outputs "MB" for "milo banana" :( outputs "RTB" for "Robert Thomas Bowden" \ expected output, but not "RT\nB\n" :( outputs "R" for "ROB" \ expected output, but not "R" :( outputs "RTB" for "Robert thomas Bowden" \ expected output, but not "RT\nB\n" https://sandbox.cs50.net/checks/2ca970050c2b4d2a919289d82b48c004 jharvard@appliance (~/Dropbox/pset2): make initials clang -ggdb3 -O0 -std=c99 -Wall -Werror initials.c -lcs50 -lm -o initials jharvard@appliance (~/Dropbox/pset2):
Checck50 results for initials.c program without printf(“\n”); command at the end of the file
jharvard@appliance (~/Dropbox/pset2): check50 2014.fall.pset2.initials initials.c :) initials.c exists :) initials.c compiles :( outputs "MB" for "Milo Banana" \ expected output, but not "MB" :( outputs "MB" for "milo banana" \ expected output, but not "MB" :( outputs "RTB" for "Robert Thomas Bowden" \ expected output, but not "RTB" :( outputs "R" for "ROB" \ expected output, but not "R" :( outputs "RTB" for "Robert thomas Bowden" \ expected output, but not "RTB" https://sandbox.cs50.net/checks/bb175df6547343449c101c4bbf4ede5f jharvard@appliance (~/D Can anybody have any suggestions to remove the remaining error revealed by check50 i.e the unwanted \n output after the first two initials of the name Robert thomas bowden? Honor code prevents me listing my complete program. If anybody needs it to understand my initials.c program listing, I can provide it if they have a reddit account. uma1966