Based on density functional theory, we have studied the structural stability, elastic, mechanical and lattice dynamical properties of AgC and AuC compounds for various structures: NaCl (B1), CsCl (B2), ZnS (B3), wurtzite (B4), WC (B-h), NiAs (B8(1)) and CdTe. Generalized gradient approximation has been used for modeling exchange-correlation effects. The second-order elastic constants and related polycrystalline properties (bulk modulus, shear modulus, Young's modulus, Poisson's ratio, Debye temperature and sound velocities) have been calculated and discussed. We have also calculated phonon dispersion and phonon density of states of these compounds in all considered structures. According to the results, we found that, AgC compound is mechanically and dynamically stable in B8(1), B1 and B4 structures. Our results indicate that B81 and B3 are the candidate stable structures energetically, mechanically and dynamically for AgC and AuC compounds, respectively.