Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Check for Balanced Parentheses using Stack?



Check for Balanced Parentheses using Stack?..

Answer / 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

More C++ General Interview Questions

What is c++ and its uses?

0 Answers  


What are the different types of variables in C++?

1 Answers  


Can we define a constructor as virtual in c++?

0 Answers  


write a program to add two numbers without using an arithmetic operator.

1 Answers   NIIT,


What is the use of vtable?

0 Answers  


What are pointer-to-members? Explain.

0 Answers   iNautix,


What is the Standard Template Library?

1 Answers  


What is the difference between const and constexpr?

4 Answers  


What is the handle class?

1 Answers  


What is a constructor initializer list and when we use constructor initializer list?

3 Answers   Soft Info, TCS,


What are move semantics?

0 Answers  


What is the protected keyword used for?

0 Answers  


Categories