%C does not skip any leftover whitespace( newline while entering the previous input ). It immediately reads that and returns.
But if we change the order of reading the inputs (char first)
printf("enter a value");
scanf("%c",&ch);
printf("enter");
scanf("%d",&a);
It works fine.
Possible Solutions :
1. Using an extra white space before %C specifier :
scanf(" %c",&ch);
2. or using getchar() in between to consume any newline feed in the input stream.
#include <stdio.h>
int main() {
int a;
char ch;
printf("enter");
scanf("%d",&a);
getchar();
printf("enter a value");
scanf("%c",&ch);
return 0;
}
One more possible situation :

There is a newline after every character in the input file which is consumed in the next iteration:
So to prevent this : using getchar() just after scanf():
