Assignment 2 grading

Assignment 2 grading

by Aashutosh Sharma -
Number of replies: 3

Hallo,


I was told that my code was not reproducible and that it ran into segmentation issues. I ran that code again with a script and I am not running into any segmentation issues. I am willing to provide the .c file(which fully matches the code given in the handover) and the script as well to prove that it is not the case.



In reply to Aashutosh Sharma

Re: Assignment 2 grading

by Erik Fabrizzi -

Just an hint:
This line 
   int size = (int)(pow(1.5, N));
overflows the int datatype for very low values of N leading to a segfault. The code indeed works (tested on my machine, meggie, and fritz) for N< 44 as the script does.  I guess that the issue is is that in the command line argument you ask for a <size> and not for an exponent, leading who uses your program to input an array size( much higher than 44) wich overflows the datatype and leads to a segfault.

In reply to Erik Fabrizzi

Re: Assignment 2 grading

by Aashutosh Sharma -
I understand. However, the task had suggested values from 8 to 44 so that's what i did. The result which I put in my handover is thus reproducible. Shouldn't I be graded on that?
In reply to Aashutosh Sharma

Re: Assignment 2 grading

by Erik Fabrizzi -
I am not a grader so Idk what to tell you sorry! I am sure that if any of them sees it they might give the points back since is more a misunderstanding than anything