You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In exercise 6.35, if we pass val-- to the fact function instead of val - 1, the fact function will be invoked every time with the same value val, that's because val-- decrease the value by 1 and return a copy of the original value.
as a result, there will happen a stack overflow and the program will crash.
The text was updated successfully, but these errors were encountered:
In exercise 6.35, if we pass
val--
to thefact
function instead ofval - 1
, thefact
function will be invoked every time with the same valueval
, that's becauseval--
decrease the value by1
and return a copy of the original value.as a result, there will happen a stack overflow and the program will crash.
The text was updated successfully, but these errors were encountered: