Why fgets is not inputting first value?
问题 I am writing a program to write my html files rapidly. And when I came to write the content of my page I got a problem. #include<stdio.h> int main() { int track; int question_no; printf("\nHow many questions?\t"); scanf("%d",&question_no); char question[question_no][100]; for(track=1;track<=question_no;track++) { printf("\n<div class=\"question\">%d. ",track); printf("\nQuestion number %d.\t",track); fgets(question[track-1],sizeof(question[track-1]),stdin); printf("\n\n\tQ%d. %s </div>",track