YTM zero coupon bond

are zero coupon bonds compounded semiannually or annually? If YTM of a 10 year zero coupon bond is 8 percent should we use 4 as I/Y and 20 as N? or 8 as I/Y and 10 as N?

Despite the fact that they are zero-coupon bonds, standard practice is to calculate their price assuming semi-annual compounding. So you are correct using i=4% and N=20.

If I am not wrong, you have to assume semi-annual compounding for CFA exams unless stated explicitly. US bonds are compounded semi-annual and EUR bonds annually. AFers please correct if above is not true.