I'm passing a dynamic allocated variables into a function , and after returning from that function , when I run inputs on the code , some of those inputs makes the program to crash .
As you can see , I test the argv
array , twice , once at the end of divide
, and another
time after I return from divide
. In the first check I get all the values of argv
from
index 0
to argc
, but in the 2nd
check (after returning from divide
back into main
)
index 0
make the for
loop to crash .
So obviously I'm doing something wrong , any idea what ?