scanf tips

prefix get char with a whitespace. Otherwise scanf will parse whitespace and store in c.

scanf(" %c", &c);