As the people above said, go for ArmA 2 if you are interested in realism and have a couple of friends to play with (yeah, to me arma is no fun when playing alone), go for CoD if you want some fast paced action. I wouldnt reccomend either though, get arma 3 or wait for battlefield 4 (providing you have the hardware required).
EDIT: Thought you were looking for a game to buy, not just comparing the two.. Anyways you cant really compare them since they are completely different games. To be honest I never had crazy fun when playing arma, but cod is way worse... So between the two arma it is.