I tried to draw the Lewis structure of $\ce{HCOOH}$ but I didn't get the correct representation.
As you can see in the picture below, at no. 1, I put $\ce{C}$ as the central atom because it has less electronegativity than $\ce{O}$ ($\ce{H}$ cannot be a central atom). I drew the structure, but it is wrong because it violates the octet rule.
Then I came up with another structure as shown at no. 2, and it seemed correct to me, but when I searched on Google for the correct structure, I found out that I am wrong.
Why is the structure that I drew in no. 2 wrong, even though the formal charges are zero?
How do I figure out the correct order of atoms in such molecules like the one above. What I mean is how do I know that the $\ce{C}$ will have $\ce{H}$ on the left and one $\ce{O}$ up and $\ce{O, H}$ on the right side?