The problems seem to occuring within your PrintExp() function. Note that you declare the variable "res" in this function and initialise it to 0. You then try to use a for loop to print the Result heading which iterates from 0 to < res (which is zero at this point). Essentially this;
for (r = 0; r < res; ++r)
does nothing as the first time this is evaluated res is not less than 0 (it is equal to zero) and thus the code continues without iterating through this loop.
Now the next problem is that when you don't enclose the appropriate code within braces, only the first line following the for loop is executed. So even if "res" was set to an appropriate value it would only execute the following lines of code the appropriate number of times, and everything else just the once:
In order to fix the issue with the value of "res", I would recommend either passing the value of res to the function itself or incorporating a counter containing the number of results for each experiment in one of your structs.Code:for (r = 0; r < res; ++r) printf("\n\t\t");
Also - you should not use fflush(stdin), this is undefined. You can use something along the lines of:
while( getchar() != '\n' );