Ad
  • Custom User Avatar

    hold up am i suppose to replace the specific part of the array with null instead of invlidating the whole sequence... cause i'm "returning NULL;" upon any one of them being invalid.

  • Custom User Avatar

    but how is it my own bug when all i'm doing is "return NULL;"?
    "return NULL;" is called upon the number having more than one degit ie. > 9 and when its negative ie < 0
    i even print tested each section, and 33 & -1 does get handled correctly and is passed off to the "return NULL;"
    and ik "return NULL;" is called as the print statement afterwards isn't called.
    so i don't see how it is my bug-

  • Custom User Avatar

    The test case for my invalid inputs are working, but when i "return NULL;" i can't seem to pass the invalid inputs test, the return is nested within the if statement and seems to be accessible, it does also end the function as no other print statements after return does work.

    So what's going on? my language I'm using is C.

    Conclusion: return NULL isn't working in C for invalid inputs test