Protonation of ketone and ester
As was mentioned in the comments, with reference to the Myers $\mathrm{p}K_{\mathrm{a}}$ table, the $\mathrm{p}K_{\mathrm{a}}$ values of a protonated ester and a protonated ketone are largely similar (in the region of $-7$ to $-6$).

Therefore, it will likely depend on external factors, which group is protonated first. Are there electron withdrawing or electron donating groups in the vicinity of either? Can the proton on either maybe intramolecularly hydrogen bond to something? 

All these effects will also slightly modify the $\mathrm{p}K_{\mathrm{a}}$ of the functional group you’re observing. The one with the higher $\mathrm{p}K_{\mathrm{a}}$ will be protonated first. Thus, it is impossible to give a general answer here, it depends on which molecule you have and which groups are where.

Side fact: $\ce{HCl}$ has almost the same $\mathrm{p}K_{\mathrm{a}}$, so the protonation will be very close to equilibrated between all three components.