.


:




:

































 

 

 

 


, , (enum), ,




a) Data, S_TYPE, 3 : char*, long, double. , , - Old_Story, 12L, 23.4e8.

struct S_TYPE

{

char* a;

long b;

double c;

};

main()

{

struct S_TYPE data;

Data.a="Old_Story";

Data.b=12L;

Data.c=23.4e8;

}

b) ST_R, 3 : ST_R, long, 3 signed int. ' ' - struct ST_R, 4 ?

struct ST_R

{

struct ST_R *p1;

long *p2;

signed int p3:3;

};

10

c) LEXEMA id, operator, cont, ssymbol, tab, l t . - l = t = cont;?

enum lexeme {id,operator,cont,ssymbol,tab} l,i,t;

, ont (2);

d) Y W_T, 2 : - 4 unsigned ', ' 2 : double long. ' ' - struct W_T?

struct W_T

{

unsigned:4;

union

{

double a

long b

}c;

}Y;

14

e) F, T_TYPE, 4 : char [12], long, double, 5 signed. , , - Butter, 17843l, 234.89e5, 1010 16- .

f) ' MY_U, ' 3 : char [4], double unsigned. ' ' - union MY_U?

g) ' .

, , stdin stdout.

h) r?

r" ,

. , NULL.

FILE* file_ptr;

if((file_ptr = fopen(cdirfile.txt, r))!= NULL)

{

/* , */

}

else

{

/* , */

}

i) w?

w - ; , ; , .

j) a+?

a+ (/); ;

.

k) r+b?

l) w+t?

8) , , , * **.

- :

struct ELT { struct ELT *next;

double M;

};

void add_to_list(struct ELM **head, struct ELM *elm), elm head, head ( ).

{

*elm->next = *head;

*head = elm;

}

 

- :

struct ELT { struct ELT *next;

struct ELT *pred;

long M;

};

long Length(struct ELM *head), head, head . ( ).

{

struct ELM wp = head;

long tmp=0;

while (wp!= nil)

{

wp:=*wp->next;

tmp++;

}

return tmp;

}





:


: 2017-02-11; !; : 354 |


:

:

.
==> ...

1746 - | 1692 -


© 2015-2024 lektsii.org - -

: 0.015 .