Answer Posted / hrpynux@gmail.com
If the current character is a starting bracket ('(' or '{' or '[') then push it to stack. If the current character is a closing bracket (')' or '}' or ']') then pop from stack and if the popped character is the matching starting bracket then fine else brackets are not balanced.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the two shift operators and what are their functions?
Describe the process of creation and destruction of a derived class object?
Difference between Abstraction and encapsulation in C++?
If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?
What is a hash function c++?
Explain the differences between private, public and protected and give examples.
What do you mean by storage classes?
What is c++ hash?
What parameter does the constructor to an ofstream object take?
How do you write a function that can reverse a linked-list?
what are Operators and explain with an example?
What is the difference between the functions memmove() and memcpy()?
Who invented turbo c++?
Can constructor be private in c++?
Can we use clrscr in c++?