.


:




:

































 

 

 

 


( )




printf, scanf.

printf() . , , ... printf() stdio.h int printf(char * ,...); printf() . : , , , , . printf() . , , . . % . scanf() - . (). , , , . scanf() stdio.h: int scanf(char * ); . : , . %.

.

. - , - . . , . , , , , .. . , . : (text) (binary). - . , (, , ). - , , . , . fopen(). (, c:\my_prog.txt) , . - . ; , , : FILE *fp; FILE - , stdio.h, fp - . fopen() : fp = fopen( , " "); (.. ) , , : "c:\\my_prog.txt" - my_prog.txt :. : r - ; w - ( , );

 

, .

-, ; .

( )

, - , , ( ""): : { _ _ } _ : _ _ : _ - _ -34- , - . - . ( ) ; - . - , - . - , .

: if () if () else , , . , , . , else else if, else.

while

while while () , . .

do

do do while () , . .

for

for (1; 2; 3) -35- for : 1; while (2) { 3; } , ; , - , , ; , . . , while - while (1); .

switch

switch (), , . switch () -, int. - . case, - : case : int. . . , - default: switch -. , -, . default, , . - default , - . case default - , , . break (.0.8). , , - . , . : switch (regim) { case ' x ': regx++; case ' X ': case ' Y ': regY++; break; case '-': regx = 0; break; default: err (""); goto next; }

break

break; while, do, for switch; - , -.

continue

continue; while, do for; . , while (...) { | do { | for (...) {... |... |... contin:; | contin:; | contin:; } | } while (...); | } -37- continue goto contin. ( contin: ; . . 0.13.).

- return, return; return ; . - -. , -, , . - . , ( ).

goto

- goto 1 (. 0.12), .

, : : , - goto. , , .

:; , } - , while.

 





:


: 2016-12-18; !; : 445 |


:

:

, , .
==> ...

1479 - | 1386 -


© 2015-2024 lektsii.org - -

: 0.069 .