普通
printf("%s\n", a ? "成功" : "失敗");
あるいは
printf("%s\n", ["失敗", "成功"][a]);
って書けると良いね