Needs["SymbolicC`"]
addTwo[type_]:=CFunction[type,"addTwo_"<>type,{{type,arg}},CReturn[COperator[Plus,{arg,2}]]]
ToCCodeString[addTwo/@{"char","short","int","float","double"}]