The problem isn't the first letter of the string
your comparing the null terminator of both strings which is equal
@line 6 remove the +1 from strlen
@line 13 change the condition to count<length (compare only the last letter value)
zeroliken
Nearly a Posting Virtuoso
1,346 posts since Nov 2011
Reputation Points: 214
Solved Threads: 205
Skill Endorsements: 13
Why not add a print statement with two getchar()'s afterward (to pause the screen) the first time through the loop, and print out exam[0] and correct[0] and see what's going on?
It looks right, but sometimes the errors are just too simple to catch with a look through.
Are you compiling or running this program in Debug mode? If so, try a release mode. Sometimes debug mode gets twisted 'round.
Adak
Posting Virtuoso
1,640 posts since Jun 2008
Reputation Points: 456
Solved Threads: 196
Skill Endorsements: 6
weird I tried the whole code myself with the corrections I mentioned and got the 15 with all the correct answers...
I think you should try what Adak suggested :)
zeroliken
Nearly a Posting Virtuoso
1,346 posts since Nov 2011
Reputation Points: 214
Solved Threads: 205
Skill Endorsements: 13
Question Answered as of 1 Year Ago by
zeroliken
and
Adak