Doubt doubt doubt

https://ide.codingblocks.com/s/589987 --> why my code is not working for the input “({})” ???

can you explain??

at line no 38 correct statement will be

if (stk.top() != '{')