The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement. (user1118321 has generously provided a version with corrected indentation a version with corrected indentation)
The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement. (user1118321 has generously provided a version with corrected indentation)
The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement. (user1118321 has generously provided a version with corrected indentation)
The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement. (user1118321 has generously provided a version with corrected indentation )
The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement.
The most obvious weirdness about your code is the inconsistent indentation. Indeed I was convinced that there was a missing }
at the end until I scanned the whole thing much more carefully. Indent everything within a function one level and add additional levels at each new nested statement. (user1118321 has generously provided a version with corrected indentation )
printf("Id\tName\t" "S1\tS2\tS3\t" "Total\n""Total\n\n"
"\n%d\t%s\t"
"%d\t%s\t" "%d\t%d\t%d\t" "%d\n",
p[i]->id,p[i]->name,
p[i]->sub[0],p[i]->sub[1],p[i]->sub[2],
p[i]->total);
student *data = NULL;
int data_n = 0;
data = malloc((data_n=10) * sizeof*datasizeof *data);
data = realloc(data, (data_n *= 2) * sizeof*datasizeof *data);
printf("Id\tName\t" "S1\tS2\tS3\t" "Total\n"
"\n%d\t%s\t"
"%d\t%d\t%d\t" "%d\n",
p[i]->id,p[i]->name,
p[i]->sub[0],p[i]->sub[1],p[i]->sub[2],
p[i]->total);
student *data = NULL;
int data_n = 0;
data = malloc((data_n=10) * sizeof*data);
data = realloc(data, (data_n *= 2) * sizeof*data);
printf("Id\tName\t" "S1\tS2\tS3\t" "Total\n\n"
"%d\t%s\t" "%d\t%d\t%d\t" "%d\n",
p[i]->id,p[i]->name,
p[i]->sub[0],p[i]->sub[1],p[i]->sub[2],
p[i]->total);
student *data = NULL;
int data_n = 0;
data = malloc((data_n=10) * sizeof *data);
data = realloc(data, (data_n *= 2) * sizeof *data);