You are on page 1of 3

C/C++

C/C++ - .
.
C/C++ (Programs)
.
1. (OS). . (CentOS-Linux) .
2. (Compiler) gcc .
.
C -
(Documentation Section)
(Link Section)
(Definition Section)
(Global Declaration Section)
Main (Main Function)
{

(Declaration Statements)
(Executable Statements)

(Function Definitions)
1() - Function1()
{
}
2 - Function2()
{
}
.
.

1. (Link Section)
2. Main (Main Function)

:
(Header Files)
.
..
#include<stdio.h>
stdio.h .
.
:
scanf
:
printf

.
printf(MY NAME);
MY NAME .

#include<stdio.h>
int main()
{
printf(MY NAME\n);
}
VI editor emacs .C
(. myname.c)

1.
$ gcc myname.c
2. a.out
3. ./a.out
.
$ ./a.out
MY NAMW
$
.....

\n ?
(scanf) ?
(executable in other names than a.out)
?
.......

You might also like