the program below compiles properly. Its supposed to "print" the below source code saved inside "mytxt.txt" . But i get only some parts of the text in output.
PS : how do i upload the screen shot of the console output from my pc ?
I surmise that it is only printing the even numbered lines in your file. That is because your while statement is reading a line and then you read another line in the while loop. And you only print the line that was read in the loop. Try:
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
a bit of art, as a gift, that will fit in a stocking