subject

Write a function int checkBalance(char exp[]); that can take an expression as input and check whether the parenthesis used in that expression are valid or invalid. It returns 1 if it is valid, and returns 0 if it is not valid. For example, the following expressions are valid: [ A * {B + (C + D)}] and [{()()}]

The following expressions are invalid:

[ A * {B + (C + D})], [ { ( ] ) ( ) }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 24.06.2019 06:50
What are the things you are considering before uploading photos on social media?
Answers: 1
question
Computers and Technology, 24.06.2019 08:20
Which type of entity describes a fundamental business aspect of a database? a. linking b. lookup c. domain d. weak
Answers: 3
question
Computers and Technology, 25.06.2019 05:50
Acolor class has three public, integer-returning accessor methods: getred, getgreen, and getblue, and three protected, void-returning mutator methods: setred, setgreen, setblue, each of which accepts an integer parameter and assigns it to the corresponding color component. the class, alphachannelcolor-- a subclass of color-- has an integer instance variable, alpha, containing the alpha channel value, representing the degree of transparency of the color. alphachannelcolor also has a method named dissolve (void-returning, and no parameters), that causes the color to fade a bit. it does this by incrementing (by 1) all three color components (using the above accessor and mutator methods) as well as the alpha component value. write the dissolve method.
Answers: 2
You know the right answer?
Write a function int checkBalance(char exp[]); that can take an expression as input and check whethe...
Questions
question
Business, 30.01.2020 08:03
Questions on the website: 13722361