Balanced_Parenthesis

My solution : https://ide.codingblocks.com/s/34840
Question Link : https://hack.codingblocks.com/contests/c/511/326

output where wrong:::

In this code, this input ())( has also two opposite parenthesis & it is displaying yes but these are not balanced. That,s Why it is showing wrong answer.

Please help me to resolve this error in my program where the mistake is occurring…

In your code in line 42, you are doing
if (true){
}
this would always run as arguement is true
hence it would print yes

Your function parenthesis returns bool value, so you need to store it in a bool variable,
just calling the function would not work as you are not using its returned value…

so what can i do for resolve this??

https://ide.codingblocks.com/s/35348

Still getting wrong answer

@Unique-Jain-90707534 Actually bro the hidden thing in the question is that we have to check for every opening and closing bracket that means (,[,{ all these 3 brackets should be checked and that is not mentioned in the question. It took me some time to figure it out myself.