Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • This would make perfect sense, except that the first line of output does not follow that pattern Commented Dec 29, 2022 at 22:54
  • @MJohnson why not? It seems just like the other lines. Commented Dec 29, 2022 at 23:04
  • @aviro This explanation for the DOS formatted file shows that the first line starts with companyName (which is the desired result), but the actual test resulted in the first (and all) lines beginning with &urbanCode Commented Dec 30, 2022 at 0:18
  • 2
    @MJohnson In my answer I say that first, 'companyName=&address1=123&city=Fake&state= is printed, followed by St Miami FL. Then the cursor goes back to the start of the line, and &urbanCode=&zip=' overwrites what was previously at the start of the line. This is exactly what happens and the result is exactly what you see when you run your code. Commented Dec 30, 2022 at 0:20
  • 1
    Ah - missed the overwriting part of your response. This does indeed make sense. Thanks! Commented Dec 30, 2022 at 1:00