Dau=1; S=0;
for (i=1; i<=6; i++)
{
S=S+Dau*I;
Dau= (-Dau);
}Cout<
The result is
A -
-2
B -
-4
C -
4
D -
2
2-
Definitions of member functions for the LinkedList class are contained in
A -
LinkedList.cpp file
B -
LinkedListDemo.cpp file
C -
LinkedList.h file
D -
LinkedList.txt file
3-
deleteNode() function requires the ____ of the data element of the node that is being
removed.
A -
variable
B -
declaration
C -
value
D -
reference
4-
Describr the running time of the following pseudocode in Big O notation:
for (int i = 0; i < n; ++i) {
for (int j = 0; j < n; ++j) {
a = a+ b;
}
}
A -
O(n^2)
B -
O(n)
C -
O(1)
D -
O(0)
5-
Draw a binary expression tree that stores the expression: (((a – b) / c) + (d * e))
A -
a
B -
c
C -
b
D -
d
6-
Each entry in a linked list is called a ____
A -
None of the above
B -
Node
C -
Data structure
D -
Link
7-
Entries in a stack are "ordered". What is the meaning of this statement?
A -
A collection of Stack can be sorted
B -
There is a first entry, a second entry, and so on
C -
The entries must be stored in a linked list
D -
Stack entries may be compared with < operation
8-
Execute this code with pushes and pop method of stack s:
IntStack s = new IntStack( );
push (s, 1);
push (s, 2);
push (s);
push (s, 3);
cout<
Value in screen will be:
A -
2
B -
Program Error when run this segment code
C -
3
D -
1
9-
Give the binary tree with root A. The root has left child B and right C. B has left child D
and right child E. There are no other nodes in the tree.
Which of the following is an inorder traversal of the tree
A -
ABCDE
B -
ABDEC
C -
DEBAC
D -
DBEAC
10-
Execute this code with pushes and pop method of stack s: IntStack s = new IntStack( );
push (s, 1);
push (s, 2);
push (s);
push (s, 3);
push (s, 2);
cout<
Value in screen will be:
A -
2
B -
1
C -
3
D -
program is breaked because of an error by Stack is empty