part 2 multiply test failure

45 views
Skip to first unread message

Taha Liaqat

unread,
Oct 9, 2020, 2:58:22 PM10/9/20
to cmpt-295-sfu
SFU ID: tliaqat
Github username: tliaqat
Github: Link to github repo (your assignment repos are private so these links are only accessible to TAs and Instructor) https://github.com/CMPT-295-SFU/assignment-2-tliaqat

Line and file: part2.c
Expected behavior: multiply test finishes properly
Observed behavior: multiply test says "IndexError: list index out of range"
Question: Why does my multiply test go out of bounds? All of the actual vs expected addresses are quite close, so Im assuming it has something to with incrementing my PC, but I do increment in all my functions. And all of my individual tests do pass.


Regards,
Taha Liaqat

Screen Shot 2020-10-09 at 11.55.18 AM.png

Parmida Vahdatnia

unread,
Oct 9, 2020, 4:26:50 PM10/9/20
to cmpt-295-sfu

you haven't specified a line or function so I won't be able to debug your entire file but it looks like your pc handling is missing one instruction.
you can place printfs inside your code to observe what happens at each step.

Taha Liaqat

unread,
Oct 9, 2020, 4:29:25 PM10/9/20
to cmpt-295-sfu
do you mean it looks like I'm missing a pc+=4?

stuntm...@gmail.com

unread,
Oct 9, 2020, 6:28:24 PM10/9/20
to cmpt-295-sfu
TA means that you have to specify a line or function in your query
Reply all
Reply to author
Forward
0 new messages