Successfully reported this slideshow.
Upcoming SlideShare
×

of

Upcoming SlideShare
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 4 - ΤΕΛΕΣΤΕΣ και η ΔΟΜΗ ΕΛΕΓΧΟΥ (ΕΚΤΥΠΩΣΗ)
Next

0 Likes

Share

# Η ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 16 - ΣΥΝΑΡΤΗΣΕΙΣ ΕΞΟΔΟΥ

.

See all

### Related Audiobooks

#### Free with a 30 day trial from Scribd

See all
• Be the first to like this

### Η ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 16 - ΣΥΝΑΡΤΗΣΕΙΣ ΕΞΟΔΟΥ

1. 1. H C 16: / : E A. stdout 1. 2. putchar() 3. putc() fputc() 4. puts() fputs() 5. printf() fprintf() B. ! "# \$% !& # A. ! 1. " '! "# \$% !& # # " \$ C, % \$ & ' (streams). " ( " & ) % ) ( % \$( . * ( & % & + ) \$ ) \$ : , ) " \$ (stdin) ) ) - + " ) )( " ( % . (stdout) . stdout stdin A. ! 1. " (! "# \$% !& # H C ) \$ ) % \$ ) .( \$ stdio.h , " % & & : / ) )' \$ " : \$ putchar, putc " fputc / ) )' - ( : \$ puts " fputs 0 ) )' ( ) ) : \$ printf " fprintf / \$ \$( " stdout
2. 2. A. ! 2. # putchar() )! "# \$% !& # , ) & ) putchar : 0 \$ - -( " : # \$ \$ ASCII "& " & " ) - (( " . ) \$1 " ) % 1 " EOF ) ) & ( . int putchar(int ch) stdio.h A. ! 2. # putchar() ! "# \$% !& # , ) " & ) % " putchar . /* putchar.c: Epideiksi tis putchar */ #include <stdio.h> main() { int i; for (i=40; i<100; i++) putchar(i); } A. ! 3. / fputc() " putc() *! "# \$% !& # , ) & ) getch : 0 \$ - -( " : , ) ' \$ ASCII "& " , ) \$) stdout. & : 2 ) % )' \$ " ( ) ) # ) 1 putchar() \$ : 0 \$ : int fputc(int c, FILE *fp) stdio.h int putc(int c, FILE *fp) stdio.h A. ! 3. / fputc() " putc() +! "# \$% !& # , ) " & ) % " getch #include <stdio.h> main() { int i; for (i=40; i<100; i++) fputc(i,stdout); }
3. 3. A. ! 4. / puts() " fputs() ,! "# \$% !& # , ) & ) fputs : 0 \$ - -( " : , ) ' - ( () " " & ) , ) \$) stdout. & : 2 ) % )' - ( ( ) ) H )' - ( s ( \$ " 0) " (( + % ! ) \$1 1 ( ) % " ( , " EOF ) ) & ( . \$ : 0 \$ : int fputs(char *s, FILE *fp) stdio.h int puts(char *s) stdio.h A. ! 4. / puts() " fputs() -! "# \$% !& # , " ( ) % " « ) \$ » " )& : /* puts.c: Epideiksi tis puts */ #include <stdio.h> main() { int i; char *s="Hello World!"; puts(s); puts("-----------------"); for (i=0; i<100; i++) { puts(&s[i]); if (s[i]=='0') break; } } A. ! 5. / printf() " fprintf() ! "# \$% !& # , ) & ) printf : 0 \$ - -( " : 1 ' ( « 9: %&% / \$ & » ! + : 0 \$ - -( " : # ( % ) printf (( ) )' " , )& ) ! \$ - + ) ' to “stdout” int printf ( const char * format, ... ); stdio.h int fprintf (FILE *fp, const char * format, ... ); stdio.h A. ! 5. / printf() " fprintf() ! "# \$% !& # , " ( ) % " « ) \$ » " )& : /* fprintf.c: Epideiksi tis puts */ #include <stdio.h> main() { int i; for (i=0; i<100; i++) { fprintf(stdout,"n%d*%d*%d=%d",i,i,i,i*i*i); } }
4. 4. 3. " 1. - ( ' '! "# \$% !& # 4 \$ ) % ) : 1. 5 - + - ( ) . 2. 5 )' - ( . , ) % ) & " ) \$) ) gets " puts (" \$ ) 3. " 2. - ( ' (! "# \$% !& # 4 \$ ) % ) : 1. 5 - + - ( ) . 2. 5 )' - ( . , ) % ) & " ) \$) ) getchar " putchar (" \$ ) 3. " 3. - ( ' )! "# \$% !& # 4 \$ ) % ) : 1. 5 - + - ( ) . 2. 5 )' - ( . , ) % ) & " ) \$) ) scanf " printf (" \$ )

.

Total views

1,860

On Slideshare

0

From embeds

0

Number of embeds

1,394

81

Shares

0