AThank you for questions on the commodity inspection. ;
BImporters must have the right to re-inspect goods upon arrival. ;
CSure. Let’s talk about thetime of shipment and payment.
第1题:
A、should
B、ought
C、must
D、shall
第2题:
Third Mate, we’ll enter the harbour, you should ring “________”now.
A.Stand by
B.Ring off engine
C.Finished with engine
D.Finish it
第3题:
If possible please suggest further improvement of the String class.
Question 3:
Given a link list, detect whether it's circular using only one loop.
Tips: Below implementation is allowed
for( ... )
{
...
}
The following implementations is NOT allowed
...
for( ... )
{
...
for( ... ) {...}
}
...
or
...
for( p = list->head, q = list->head; p != NULL && q != NULL; p = p->next )
{
...
}
...
for( ... )
{
...
}
第4题:
A. is
B. is going
C. will
D. shall
第5题:
Simplify the following Boolean expression
!((i ==12) || (j > 15))
struct Node {
int value;
Node* next;
};
1.1 Get the value of the Nth node from last node in the linked list.
PARAM HEAD: the first element in the linked list:
PARAM n: the number of the node counted reversely
RETURN: the value of the node, or -1 if not exists
int GetValue(Node* HEAD, int n)
{
}
1.2 Delete a node WITHOUT using the HEAD pointer.
PARAM p: A pointer pointed to a node in the middle of the linked list.
RETURN: void
void Delete(Node* p)
{
}
1.3 Insert a new node before p WITHOUT using the HEAD pointer
PARAM p: A pointer pointed to a node in the middle of the linked list.
PARAM value: new Node value
RETURN: void
void Insert(Node* p, int value)
{
}
Question 2:
Please write a String class with following features:
第6题:
What do you mean, there are only ten tickets? There be twelve A. should B. would C. will D. shall