In a period, on moving from left to right, the electrons are added to same principal energy level. Atomic number and nuclear charge increases but the added electron is shielded poorly from the nucleus. Effective nuclear charge increases, atomic radius decreases and ionization energy increases. Hence, the ionization energy of carbon is more than that of boron.