Basic and Advance C Question:
Download Job Interview Questions and Answers PDF
Why doesnt that code work?
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 .
Download C Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
How can I read data from data files with particular formats? | Why doesnt this code work? |