Help needed in debugging.Redundant Parenthesis

My code is showing segmentation fault. Could you please tell me where i am going wrong?https://ide.codingblocks.com/s/243283

if the input it “()” you first pushed ‘(’ and then when you encounter ‘)’ you popped ‘(’ and then you again tried to pop another element. which is giving you a seg fault.
I have fixed your code have a look.