Translated by Ralph Anzarouth and an anonymous friend
Do firstborn by cesarean section fast?
[from Shulchan Arukh 470:1 - 'שולחן ערוך ת"ע א]
Accordingly, a firstborn by caesarean section and the child born after him, neither of whom are considered firstborn for the purposes of inheritance1 or redemption2, as explained in the Shulchan Arukh (Yoreh Deah 305 and Choshen Mishpat 277), need not fast. However, the case of one born by caesarean section needs further investigation in the Halakhah, since maybe specific birth conditions are required by the text of the Torah:
- in the case of the inheritance it is written (Devarim 21, 15): "they bear him sons";
- in the case of redemption, it is written (Shemot 13, 2): "opens the womb";
whereas in our case [i.e. the fast of the first born], which is to remind us of the miracle in which they were saved from the plague of the firstborn, the Torah says (Shemot 13, 15) "firstborn" with no further specification. For this reason, this issue needs deeper consideration. See [the book] Chavat Yair. For Halakhic purposes, since the requirement to fast for this category of firstborn is merely because of a doubt, there is no need to fast, as it is written in Chavat Yair.3 See further § 6 and § 7 and also the end of § 8.
Notes of the translators:
 A first born son takes a double portion in his father's estate. Thus it is important to assess Halakhically which (if any) of the children is considered the first born for this matter.
 A first born from his mother must be redeemed from a Cohen. Thus it is important to assess Halakhically which (if any) of the children is considered the first born for this matter.
 The general rule is that when there is a doubt in a rabbinical decree, we take a lenient position. This would seem to be the author's intention in the case of a firstborn by caesarean section. Of course, since some Poskim disagree, each one will consult a proper Halakhic authority in order to learn how to conduct Halakhah Lemaaseh.
Rabbi Yaakov Chaim Sofer, who lived about one hundred years ago in Bagdad and Jerusalem, is the author of the Kaf Hachaim, a 10-volume book on Jewish Law (8 volumes on Orach Haim and 2 volumes on Yoreh Deah). The original text which we translated is taken from Kaf Hachaim 470:3 and it can be found here, while the mentioned paragraphs 6, 7 and 8 are here (courtesy of Hebrewbooks.org).