These two codes are the same: code1 and code2, the only difference being that I have used fflush(stdin) in the second code to omit the newline character while taking two strings as input one after the other and used a temporary string to do the same in the first code. The first solution was accepted while the second one was adjudged as wrong answer. Any reasons for this?
↧