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

Can we use resume in error handling i.e. in the catch block

5 Answers   Infosys,


What are the storage qualifiers?

0 Answers  


What are default parameters? How are they evaluated in c++ function?

0 Answers  


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

0 Answers  


Can user-defined object be declared as static data member of another class?

0 Answers  


What are the two types of polymorphism?

0 Answers  


Specify some guidelines that should be followed while overloading operators?

0 Answers  


What is function overriding in c++?

0 Answers  


What do the header files usually contains?

0 Answers  


why the size of an empty class is 1

4 Answers  


What do you mean by friend class & friend function in c++?

0 Answers  


What does catch(…) mean?

0 Answers  


Categories