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
Where can I run c++ program?
what Is DCS ? what i will get benefit when i did?
What is the function to call to turn an ascii string into a long?
How important is c++?
What is vectorial capacity?
How many ways can a variable be initialized into in C++?
Is arr and &arr are same expression for an array?
What is a class template?
A prime number is a number which is divisible only by itself and 1. Examples of the first few primes are 2, 3, 5, 7, 11. Consider writing a program which can generate prime numbers for you. Your program should read in and set a maximum prime to generate and a minimum number to start with when looking for primes. This program should be able to perform the following tasks: 1. Read the maximum number from user (keyboard input) to look for primes. The program should not return any primes greater than this number. 2. Read the minimum number from user (keyboard input) to look for primes. The program should not return any primes less than this number. 3. Generate and print out every prime number between the maximum prime and minimum number specified by the user.
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
What is constructor c++?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is a down cast?
What is the most powerful coding language?
What is the difference between the functions rand(), random(), srand() and randomize()?