on-internet
← Community

scanf_s not enough arguments passed for format string(Visual Studio)

Stack Overflow ·

The program showing error as title. What's wrong on the scanf_s function? Any idea? int main() { struct Students { char name[10]; int snum; float point; } st[5]; int i; for (i = 0; i < 5; i++) { printf("-- Student Info --\n-"); printf("Enter Your Name: "); scanf_s("%s", st[i].name); printf("\nEnter Your Number: "); scanf_s("%d", &st[i].snum); } return 0; }

Comments

Sign in or sign up to comment and upvote.

No comments yet.