Please tell me where is my mistake in this code of balansing brackets how to remove segmentation fault in the code