Check for Balanced Parentheses using Stack?
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 |
Explain 'this' pointer and what would happen if a pointer is deleted twice?
what is polymorphism?
What is type of 'this' pointer? Explain when it is get created?
What is c++ hiding?
What is a node class?
What is the best c++ compiler?
What is lvalue?
What is const pointer and const reference?
When does a name clash occur in c++?
Why is it necessary to use a reference in the argument to the copy constructor?
How to avoid changing constant values?
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).