There is no hard and fast rule. But the generalization is this:
if c is followed by a consonant, o, a, or u, then it's pronounced /k/
if c is followed by i, e, or y used as a vowel, then it's pronounced /s/