Carboxylic acid is stronger than alcohol and water because after removal of proton, carboxylate ion is stabilised by resonance. Hence, correct order of acid strength is
$RCOOH > HOH > ROH > HC \equiv CH$
Which is based upon the rate of donation of proton or strength of base, thus order of basic strength is
$\bar{C} \equiv CH > R- \bar{O} > OH^- > RCOO^-$