Программа не останавливается на строке scanf («% c», & ch), почему?
программа не останавливается на scanf ("% c ", &ч) линия. почему это случается, пожалуйста, объясните мне это
#include
#include
struct list {
char val;
struct list * next;
};
typedef struct list item;
void main()
{
char ch;
int num;
printf("Enter [1] if you want to use linked list or [2] for realloc\n");
scanf("%d", &num);
if(num == 2)
{
scanf("%c", &ch);
printf("%c", ch);
}
}