You are on page 1of 30

2012/13.

_____________________________________________________________

1.

""


_____________________________________________________________


Bell
(: B)

B. Kernighan, D. Ritchie,
"The C Programming Language ANSI C",
Prentice Hall Software series

:
-
-
-
-


_____________________________________________________________


-
-

:
-
- (pointera)



_____________________________________________________________
main.c

f1.c

f2.c

f21.c

fn.c

.....

f22.c

21

f2m.c

22

.....

2m

.
.
.


_____________________________________________________________

ditor
(
)

compiler
()

C
linker
()


_____________________________________________________________

C
debugger


C
compiler
+
linker



_____________________________________________________________

( ):
): ime
ime.c
.c


- - e
e
- :
ime.c
ime
.c -> ime.obj -> ime.exe


- -


_____________________________________________________________

(
)


________________________________________________________

#include < ime_biblioteke.h >


C
#include ime_datoteke.h


________________________________________________________

#include <stdio.h>
main( )
{
.
.
.
}


________________________________________________________
int main ( void )
{
.
.
return 0;
}


( )
)
void
( )


( )
________________________________________________________
main(
{

}

(
)

( )


_____________________________________________________________

main( )
{


1.
_____________________________________________________________


-
-
- ( )


()


2.
_____________________________________________________________

- ( )


( )


3.
_____________________________________________________________


-
- ( )

:
1. ()
2. ( )
3.


________________________________________________________

:
-
-
-


izraz;

________________________________________________

/* */

( ) /

( ) /

( )
)
________________________________________________________

#include <stdio.h>
main()
{
printf("Pozdrav svima!");

/*Stampanje teksta na ekranu*/

(
))

_______________________________________________

#include <stdio.h>
main()
{ /********************
* Stampanje na ekranu *
* predefinisanog teksta *
* pomocu funkcije
*
* formatiranog izlaza *
********************/
printf("Pozdrav svima!");
}

"Pozdrav svima"
________________________________________________________

#include <stdio.h>
main(){printf("Pozdrav svima");}

"Pozdrav svima"
printf()
printf() stdio.h
________________________________________________________

#include <stdio.h>
main()
{
printf("Pozdrav svima");
}
Run

Pozdrav svima_

"Pozdrav svima"
printf()
printf()
________________________________________________________
#include <stdio.h>
main()
{
printf("\nPozdrav\n\tsvima");
}
Run

Pozdrav
svima_


________________________________________________________

\n

\t

\a

\\

\"

"Pozdrav svima"

________________________________________________________

#include <stdio.h>
main()
{
printf("Pozdrav svima") ;
}


________________________________________________________

x;
3.14;

obim=2*r*3.14;

pom=x; x=y; y=pom;


celsius = (5 / 9) *
(fahrenheit-32);


________________________________________________________

obim = 2 * r * 3.14;
celsius = ( 5 / 9 ) * ( fahrenheit - 32 );


________________________________________________________

obim = 2 * r * 3.14;
celsius = ( 5 / 9 ) * ( fahrenheit - 32 );


_______________________________________________________________________


( "
"")

1.
( )


1.


2012/13.
_____________________________________________________________

1.

You might also like