Answer the following statements true (T) or false (F)
1. logical operators AND and OR have a higher precedence than the NOT operator.
2. The following C++ test checks if the variable child is in the range 3 to 12.
3. Assuming good Data is a Boolean variable, the following two tests are logically equivalent.
4. The statement does exactly the same thing as the if/else statement below:
5. Relational expressions and logical expressions are both Boolean, which means they evaluate to true or false.
1. FALSE
2. FALSE
3. TRUE
4. TRUE
5. TRUE
You might also like to view...
Given the following declarations:
struct house { double price; int rooms; }; house *ptr1, *ptr2; which of the following is invalid? a) ptr1->price = 200000; b) ptr2->rooms = ptr1->rooms; c) *ptr1 = ptr2; d) ptr1 = ptr2;
Which of the following statements is false?
a. Object-oriented programming is today's key programming methodology. b. Java has become the language of choice for implementing Internet-based applications and software for devices that communicate over a network. c. Software commands computer hardware to perform tasks. d. In use today are more than a trillion general-purpose computers and trillions more Java-enabled cellphones, smartphones and other handheld devices.
What is wrong with using the LinkedList class, which implements the Deque interface, to implement a stack?
What will be an ideal response?
When removing an element from a binary search tree that is a leaf, ______________ will ensure that the resulting tree is still a binary search tree.
a) replacing it with its only child b) replacing it with its inorder successor c) simply deleting it d) all of the above e) neither a, b, nor c