When using a stack to evaluate the balance of brackets and parentheses in an expression, what is the first step?

A. push opening brackets onto the stack while scanning the expression
B. pop closing brackets onto the stack while scanning the expression
C. push closing brackets onto the stack while scanning the expression
D. pop opening brackets onto the stack while scanning the expression


Answer: A

Computer Science & Information Technology

You might also like to view...

Which of the following is a disadvantage of the auto-negotiation protocol?

a. It is useful only in LANs that have multiple connection capabilities. b. A failed negotiation on a functioning link can cause a link failure. c. It should be used only in critical network data paths. d. It works at 10Mbps.

Computer Science & Information Technology

In a structured program, structures can be stacked or connected to one another only at their start or exit points.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

What is the result of the binary conversion in the example shown here?

128 64 32 16 8 4 2 1 1 0 0 0 0 0 0 0 A) 128 B) 256 C) 32 D) 127

Computer Science & Information Technology

The ____ is located below the Document window.

A. Status bar B. Property inspector C. Insert bar D. Menu bar

Computer Science & Information Technology