Segmentaion Fault Phone Keypad

My code is getting segmentaion fault although it’s the same code in the video