Searches are presented for heavy scalar (H) and pseudoscalar (A) Higgs bosons posited in the two doublet model (2HDM) extensions of the standard model (SM). These searches are based on a data sample of pp collisions collected with the CMS experiment at the LHC at a center-of-mass energy of sqrt(s) = 8 TeV and corresponding to an integrated luminosity of 19.5 inverse femtobarns. The decays H to hh and A to Zh, where h denotes an SM-like Higgs boson, lead to events with three or more isolated charged leptons or with a photon pair accompanied by one or more isolated leptons. The search results are presented in terms of the H and A production cross sections times branching fractions and are further interpreted in terms of 2HDM parameters. We place 95% CL cross section upper limits of approximately 7 pb on sigma times B for H to hh and 2 pb for A to Zh. Also presented are the results of a search for the rare decay of the top quark that results in a charm quark and an SM Higgs boson, t to ch, the existence of which would indicate a nonzero flavor-changing Yukawa coupling of the top quark to the Higgs boson. We place a 95% CL upper limit of 0.56% on B(t to ch).