C Infinite Loop In Graph Function Implementation Stack Overflow

C Infinite Loop In Graph Function Implementation Stack Overflow