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

How do I tokenize a string in c++?

0 Answers  


What is meant by forward referencing and when should it be used?

0 Answers  


How is static data member similar to a global variable?

0 Answers  


What is new in c++?

0 Answers  


Explain selection sorting?

0 Answers  


Describe public access specifiers?

0 Answers  


Explain what data encapsulation is in c++?

0 Answers  


What is double in c++?

0 Answers  


int main() { int i ,a[i]; i = 0; a[i] = 10; cout<< a[i] << endl; return 0; } What will be output of this program?

11 Answers   HCL, Mphasis,


What is the difference in size of this two clasees? Class A { int a; char c; float f; } Class B { float f; char c; int a; }

4 Answers  


Can a list of string be stored within a two dimensional array?

0 Answers  


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

0 Answers  


Categories