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
|
|
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.
|
|