Answers

Question and Answer:

  Home  C Programming

⟩ Why doesnt that code work?

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 .

 112 views

More Questions for you: