.


:




:

































 

 

 

 





..


( () )

 

, 2015



. 2

. . -. 5

. 8

. 12

. 15

.. 16

.. 18

1 . 20

2 . 22

3 . 26

4 . 29

5 . 31

. 33

. 35

1. . 37

(. C) , 1970- Bell Labs . UNIX. . . . . , , . . , , .

, C, , This is my first program!.

 

//PROG1.C - .

#include <stdio.h>

int main(void)

{

printf("\n This is my first program!"); // printf

return 0;

}

:

 

This is my first program!

- , '//', " ". . prog1.c, . , /* */.

. - , , . . , , . () #include, . , stdio.h, . . , #include.

(cos), (sin), (pow), #include <math.h>, (getch)- #include <conio.h>, (strcat)- #include <string.h>. , , cos ( ), include <math.h>, . :

math.h - ;

type.h - ;

stdio.h - ;

string.h, stdlib.h ;

alloc.h, stdlib.h - ;

conio. h - ;

graphics.h - .

.

: .

main. main(). , .

, main, , main() . , . int, , , int ( ), void , main . . main ISO/ANSI. void , void main().

main. main(). , , main(). , .

4. . . printf return. . - , . , " ".

5. main \ ,

 

printf("\n This is my first program!"); // printf

 

, .

, \ , , , . , \ esc-. 1.

 

1. esc-

\a
\b ()
\n ( )
\r
\t
\\ (\)
\ ()
\ ()
\?
\000 (000 - )
\xhh (hh )

 

6. return 0 .





:


: 2017-03-12; !; : 367 |


:

:

: , .
==> ...

1760 - | 1728 -


© 2015-2024 lektsii.org - -

: 0.01 .