I want to scanf input like: \"John, Surname, 9999\" and commas should not be assigned to the scanned variable; spaces at the end and start of input deleted... Now t
Now that I have the declaration of struct student_t (and a glass of wine!)
struct student_t
It should be
int c = scanf("%19[^,], %39[^,], %i", p->name, p->surname, &p->index);
And then check if c is 3
c