#include
#include
int main(){
char i;
int c;
scanf(\"%i\",&c);
scanf(\"%c\",&i);// catch the new line or charact
The function expects a sequence of references as additional arguments, each one pointing to an object of the type specified by their corresponding %-tag within the format string, in the same order. Read about scanf
These can additionally help you:
I don't understand why I can't get three inputs in c
scanf() leaves the new line char in buffer?
Regarding the last portion of your question, the number of bits of int
is always more than char
, so it won't cause a problem.