I am currently on my OPT. Microsoft is filing for my H1B. There is a startup which is giving me an offer and they are saying to file my H1B as well. I am planning to switch once i get my H1B result. Is it legal to have these two petitions at the same time? Will i be entered in lottery twice? TC: 160k
Yes
Yes you can
Yes. But I think it's too late to file for H1B now.
Yes you can. Same employer cannot file multiple applications https://www.uscis.gov/sites/default/files/USCIS/Laws/Memoranda/2018/2018-3-23-PM-602-0159-Matter-of-S-Inc-Adopted-Decision-Package.pdf
Yes it is legal