一种配离子可以在任何情况下都可以转化为另一种配离子。( )
查看答案
const int maxstack = 10; // small value for testingclass Double_stack {public:Double_stack();bool empty_a() const;bool empty_b() const;bool full() const; //Same method checks both stacks for fullness.Error_code pop_a();Error_code pop_b();Error_code stacktop_a(Stack_entry &item)const;Error_code stacktop_b(Stack_entry &item) const;Error_code push_a(const Stack_entry&item);Error_code push_b(constStack_entry &item);private:int top_a; //index of top of stack a; -1 if emptyint top_b; //index of top of stack b; maxstack if emptyStack_entry entry[maxstack];};Double_stack::Double_stack(){ top_a = ;top_b = ; }Error_code Double_stack::push_a(const Stack_entry &item){ if (>= ) return overflow;entry[ ] = item;return success;}Error_code Double_stack::push_b(const Stack_entry &item){ if ( >= ) return overflow;entry[ ] = item;return success;}Error_code Double_stack::stacktop_a(Stack_entry &item)const{ if (== ) return underflow;item = ;returnsuccess;}Error_code Double_stack::stacktop_b(Stack_entry &item)const{ if ( == ) return underflow;item = ;return success;}bool Double_stack::full() const { return ; }bool Double_stack::empty_a() const { return ;}bool Double_stack::empty_b() const { return ; }Error_code Double_stack::pop_a(){ if (<= ) return underflow;else ;return success;}Error_code Double_stack::pop_b(){ if (>= ) return underflow;else ;return success;}typedef int Stack_entry;main(){ Double_stack e;e.push_a(1);e.push_a(2); e.push_a(3);e.push_b(1);e.push_b(2); e.push_b(3);int x;e.stacktop_a(x); cout << x;e.stacktop_b(x); cout << x;e.pop_a();e.pop_b();e.stacktop_a(x); cout << x;e.stacktop_b(x); cout << x;e.empty_a();e.empty_b();}
bool Extended_queue::full() const/* Post: Return trueif the Extended_queue is full; return false otherwise. */{}void Extended_queue::clear()/*Post: All entries in the Extended_queuehave been deleted; the Extended_queue is empty. */{}Error_code Extended_queue::serve_and_retrieve(Queue_entry &item)/* Post: Return underflow if the Extended_queueis empty.Otherwise remove and copy the item atthe front of the Extended_queue to item. */{ if ( ) return ;else {count--;item = ;front = ( ) ? 0 : (front + 1);}return ;}
发动机温度较高时,拆卸散热器盖是非常危险,因为冷却液会喷射而出。( )
A. 对
B. 错
发动机冷却液接触车身表面时,不会改变其颜色。( )
A. 对
B. 错