Answer:
Why doesn't the code
short int s;
scanf("%d", &s);
work?
When converting %d, scanf expects a pointer to an int. To convert to a short int, use %hd .
short int s;
scanf("%d", &s);
work?
When converting %d, scanf expects a pointer to an int. To convert to a short int, use %hd .
Previous Question | Next Question |
How can I read data from data files with particular formats? | Why doesnt this code work? |