prev up next   top/contents search

comp.lang.c FAQ list · Question 12.14

Q: Why doesn't the code

short int s;
scanf("%d", &s);
work?


A: When converting %d, scanf expects a pointer to an int. To convert to a short int, use %hd . (See also the table in question 12.9.)


prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North