I tried to do a small Worker Register, but it skips completely the second scanf, which gets address value. I am a beginner, so I do not know what I am doing wrong. Here is the code:
char n, ad; // n - Name, ad - Address
int i, ag; // i - Income, ag - Age
printf("Welcome to the Worker Register\n\nWorker Data\n\nName: ");
printf("Worker %s\nAddress: %s\nAge: %d\nIncome: R$%d", n, ad, ag, i);
Nad's hack of adding a getchar() seems to fix it, but I wouldn't use scanf for reading strings if I were you.
It's nicer to use fgets() reading strings instead. scanf on a string is problematic. See: Reading a string with scanf
#include <stdlib.h> ... printf("Welcome to the Worker Register\n\nWorker Data\n\nName: "); fgets(n, 256, stdin); ...