Is it possible to write in c what I have paraphrased below?

while inkey != char(32) continue with operation A, else stop and do operation B