152                             5.    - 

4.    :

struct a {

int i, j , k;

i .

 :

class a {

int i, j , k;

};

,       .   -
   public,      -
,   ?

5.     deque   4,     ,
 10,  . 126; deque   ,   
   .

class deque {
public:

void reset ( ) ;

private:

char [max_len] ;

int bottom, top;

};

    push_t, pop_t, push_b, pop_b, out_stack,
top_of, bottom_of, empty  full.  push_t   
   ;  push_b   .  out_stack
       .  pop_t  _ -
         . -
,      ,   . -
  .

6.    deque,  - relocate.  
 .,   relocate,   deque -
    ,   
max_len/2  s .      :

// true,   ,
//false   

bool deque::relocate ()

7.  ,      ( , -
  12   4,     , 
. 127).       ch_stack,   
,   .        -