C Infinite Loop In Graph Function Implementation Stack

C Infinite Loop In Graph Function Implementation Stack