Exam 6: Stacks

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

According to the __________ rule, operators with the same precedence are evaluated in left-to-right order.

Free
(Short Answer)
4.8/5
(35)
Correct Answer:
Verified

associative

A calculator (or computer) normally scans an expression string from right to left.

Free
(True/False)
4.8/5
(40)
Correct Answer:
Verified

False

Using the algorithm for converting an infix expression to a postfix expression, how is (14 + 5) - 8 * 4 / 2 Represented in postfix form?

Free
(Multiple Choice)
4.9/5
(37)
Correct Answer:
Verified

B

In programming, a(n) __________ is a data structure with the property that only the top element of the stack is accessible.

(Short Answer)
4.8/5
(46)

Complete the definition for the new function class CiLess_Than, which will be used to perform a case-sensitive comparison of characters. Complete the definition for the new function class CiLess_Than, which will be used to perform a case-sensitive comparison of characters.

(Short Answer)
4.8/5
(37)

__________ are used to separate an expression into subexpressions.

(Multiple Choice)
4.7/5
(32)

Which string is output by the last line of the following instruction set? My_stack.push("Last to arrive "); My_stack.push("first to leave "); My_stack.pop(); Cout << my_stack.top() << endl;

(Multiple Choice)
4.7/5
(35)

The stack is said to be a(n) __________ class because it adapts the functions available in another class to the interface its clients expect by giving different names to essentially the same operations.

(Short Answer)
4.8/5
(36)

Within the standard library a stack can be implemented using a vector, list, or __________ as a component to hold the contents of the stack.

(Short Answer)
4.8/5
(37)

Suppose the function is_balanced in Paren_Checker.cpp is called with the expression [ (x + y)/8 - z [ p * {r + q) ] ] What is the value of s.top() in the return statement?

(Multiple Choice)
4.8/5
(29)

Normally we write expressions using __________ notation, in which binary operators (*, +, and so forth) are inserted between their operands.

(Short Answer)
4.9/5
(44)

The __________ function (member of the istream class) is used to "unread" a single character.

(Short Answer)
4.9/5
(39)

The code segment from build_reverse, a member function of Palindrome_Finder, has been incorrectly altered. The code segment from build_reverse, a member function of Palindrome_Finder, has been incorrectly altered.   The line __________ replaces the error written into the code segment. The line __________ replaces the error written into the code segment.

(Multiple Choice)
4.9/5
(40)

An expression is __________ if each subexpression that starts with the symbol { ends with the symbol }, and the same statement is true for the other symbol pairs.

(Short Answer)
4.8/5
(43)

The advantage of the __________ form is that there is no need to group subexpressions in parentheses or even to consider operator precedence.

(Multiple Choice)
4.7/5
(37)

A(n) __________ is a string that reads the same in either direction: left to right or right to left.

(Short Answer)
4.9/5
(33)

The C++ standard requires that implementations of sequential containers provide push_back, pop_back, and back operations in (amortized) constant time.

(True/False)
4.9/5
(38)

In a(n) __________expression the operands precede the operators.

(Short Answer)
4.8/5
(42)

The action of using function top to access an item at the top of the stack, without removing it, is sometimes called __________ the stack.

(Multiple Choice)
4.9/5
(30)

The expression (w * [x + y) / z - [p / {r - q}]) Is not balanced, because the subexpression __________ is incorrect.

(Multiple Choice)
4.8/5
(38)
Showing 1 - 20 of 24
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)