ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)

Dimitris Psounis
Dimitris PsounisTeacher & Manager at Δημήτρης Ψούνης - Υπηρεσίες Εκπαίδευσης
H C
10:
.
1. char
2. O ASCII
3. char
.
1.
2. !
3. gets puts
4. " # string.h
$.
! " #
.
1. ! " # # $ char
C " # # $ char " % & " .
" & $ # " ! ' # # "
( !
) % % " 0 * 255.
+ " % ( "% , & "% $ ASCII
$# * , " % %
'" & $ # % , %,
" % , ($ "% ASCII.
- " " . :
char " % $ , $
char " % $ , $
$! " #
A.
2. ! "% ASCII
%! " #
% " % % "% $ ASCII. / # (
% " % .
.
A.
3. * " char
&! " #
* # $ :
ch ". . a "
# " :
0% $ % ASCII $# :
0% $ " :
! ' " % , " "
" $ & 1 &$& !
0"% " # " printf & " # # $ % %c.
) " "* :
char ch;
ch=97;
ch='a';
printf("%c",ch);
A.
3. * " char
'! " #
/ . " & " # % "$ " %,
" & C
/* char.c */
#include <stdio.h>
main()
{
char c;
for (c=80; c<=100; c++)
{
printf("nO xaraktiras %d einai %c",c,c);
}
}
* & "$ ASCII 128-255 " " # * c
unsigned char.
2.
1. / %
(! " #
" " " * & " % " % "
. % , # # % "
.
C &% # * " "% " . ) # $ :
* "% " 20 , " 19 $ .
3! ! 4! 0% " 19 $ ( 20) # "
" %, # 0 (slash # ).
" # & «hello» " $ . :
char str[20];
str[0] str[1] str[2] str[3]
…
str[4] str[5]
h e l l o 0
str[20]
2.
1. / %
)! " #
4 " % " % &% # $ " :
& $ " " % # . :
0"% & ( " , " * # " &$&
+ " " # " % * ( " # & 3
:
$ # * " $
# % , # " " " " ( " (
)
char pin[3]={'a','b','0'};
char pin[3]="ab";
char *pin="ab"; char pin[]="ab";
2.
2. 0 "$ %
*! " #
"$ ( printf) & $ ( scanf)
" % " # %s.
" " % " %!
% % "% $ , ( % "% ,
% # % # . .
) scanf # " " & .
" # & # * % :
/ "$ &% :
0 * # &% :
char string[100];
printf("%s",string);
scanf("%s",string);
2.
2. 0 "$ %
! " #
/ . " & & % # " *
«teststring» " «test string» (" * $ % )
# % " .
/* string.c: Deixnei tin xrisi tis scanf kai tis printf me
simvoloseires */
#include <stdio.h>
main()
{
char string[80];
printf("Dwste mia simboloseira: ");
scanf("%s",string);
printf("Pliktrologisate tin simvoloseira: %s",string);
}
2.
3. ! gets puts
! " #
' & % scanf, # , "
& & " & " * " & .
" " & ( , "
gets " " $ " :
4 " string "
# , " , " . 0%
:
%# %, puts " "*
" # $ " ‘n’:
"% %
char *gets(char *string)
int puts(char *string)
stdio.h
stdio.h
2.
4. 4 string.h
! " #
0%# % " * &$& .
0" # # % * % # # % C, % %
, :
" % %, " " " . & % * .
0 % %, "$ :
4 " % & ( src dest.
+ :
" ( " $ $ string.
5 # "
string.h
int strlen(char *string)
void strcpy(char *dest, char *src)
.
1.
$! " #
/ " $ $ ( # 0) (
.
+ % " $ " int mystrlen(char *s) " # $ %
" ( .
1 " & C, " % # , " % #
gets " " &%, "*
4 int strlen(char *s) " % string.h % * & "
" & ( " " $.
.
2. & ( *
%! " #
+ % " $ " char *mystrcpy(char *dest, char *src) " #
$ % # & ( src dest.
4 " ( # % dest.
1 " & C, " % # , " % # #
gets " #% % " & & & 1 " " #
" % % % . / "*
.
4 char *strcpy(char *dest, char *src) " % string.h % *
& " " & ( " " $.
.
3. " + ( %
&! " #
1 " & " # , " "
& % ( % "* "
6" # %. :
* % & (". . 150 $ )
" "% $ ASCII # (
" % ( % 32 * .
( % , " % %. "* %
"% ASCII & # % " % %.
" ( % " gets scanf & " & .
.
4. ( " % 0. #
'! " #
% 2 " $ "% ASCII (128-255) " "
" # " & " " % " % .
" & "* ( ,% " ):
Hello World!Hello World!
.
5. & *
(! " #
+ " & C " % :
7 # , # . ( " & " % &
" & )
7 " & " % ( & $ * "*
.
# & " :
Dwse tin 1i simvoloseira: test
Dwse tin 2i simvoloseira: abba
=====
Isxyei: abba < test
& " % int strcmp(char *s1, char *s2) string.h
" % "
1 of 5

More Related Content

What's hot(20)

Nota 041109Nota 041109
Nota 041109
el emboscado168 views
Carlos Santos - be IN MinhoCarlos Santos - be IN Minho
Carlos Santos - be IN Minho
Plataforma Empreendedor371 views
Thai Alcoholic Beverages Regulations 2011Thai Alcoholic Beverages Regulations 2011
Thai Alcoholic Beverages Regulations 2011
Asian Food Regulation Information Service471 views
Marketing Digital - parte 3Marketing Digital - parte 3
Marketing Digital - parte 3
Leandro Liberio245 views
Bio Startup Spinoff 2010Bio Startup Spinoff 2010
Bio Startup Spinoff 2010
Servadio279 views
IBC_ProfileIBC_Profile
IBC_Profile
Pankaj Sikka158 views
Cara membuat diagram_alir(1)Cara membuat diagram_alir(1)
Cara membuat diagram_alir(1)
Fujikawa Kenza224 views
Cre Referral FlierCre Referral Flier
Cre Referral Flier
semerson22121 views
RACC -Comparativa Bicis Publicas full_v120625_defRACC -Comparativa Bicis Publicas full_v120625_def
RACC -Comparativa Bicis Publicas full_v120625_def
Stéphane M. Grueso16.8K views
Оцифрованные детиОцифрованные дети
Оцифрованные дети
Andrei Mamontov392 views
GeniusGenius
Genius
Stephen Kinsella201 views
GeniusGenius
Genius
Stephen Kinsella328 views
Monthly report   functional - may 2013Monthly report   functional - may 2013
Monthly report functional - may 2013
Leonardo Silveira636 views
Ico corporate presentation enIco corporate presentation en
Ico corporate presentation en
Harpreet kaur292 views

Viewers also liked(8)

ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10
Dimitris Psounis7.1K views
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 9 ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 9
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 9
Dimitris Psounis5.2K views
Η ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 12Η ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 12
Η ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 12
Dimitris Psounis5.5K views
Η Γλώσσα C - Μάθημα 1Η Γλώσσα C - Μάθημα 1
Η Γλώσσα C - Μάθημα 1
Dimitris Psounis15.1K views
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 11ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 11
ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 11
Dimitris Psounis4K views

Similar to ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)

Magazine Anim ArtMagazine Anim Art
Magazine Anim ArtStudent
283 views26 slides
SsijialiyeSsijialiye
Ssijialiyerenata7
264 views3 slides

Similar to ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)(20)

Magazine Anim ArtMagazine Anim Art
Magazine Anim Art
Student283 views
ภาษา Cภาษา C
ภาษา C
Noppanon YourJust'one518 views
SsijialiyeSsijialiye
Ssijialiye
renata7264 views
WALA Tutorial at PLDI 2010WALA Tutorial at PLDI 2010
WALA Tutorial at PLDI 2010
Julian Dolby3.4K views
Fusion 06 2003Fusion 06 2003
Fusion 06 2003
rukford1259 views
Cuento 1Cuento 1
Cuento 1
Manuel Cumplido García166 views
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
Centro Universitario Villanueva152 views
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
Centro Universitario Villanueva196 views
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
Centro Universitario Villanueva296 views
Tomar las riendas_de_la_vida-051021Tomar las riendas_de_la_vida-051021
Tomar las riendas_de_la_vida-051021
Centro Universitario Villanueva277 views
Un petit guide de la domination du mondeUn petit guide de la domination du monde
Un petit guide de la domination du monde
Geoffrey Dorne2.2K views
Vietnam language learning behaviorsVietnam language learning behaviors
Vietnam language learning behaviors
Q&Me Vietnam Market Research6.1K views
Proactief NetwerkenProactief Netwerken
Proactief Netwerken
Jan Jacobs844 views
GCMB_DavidLaskerOfficeInsightFeatureGCMB_DavidLaskerOfficeInsightFeature
GCMB_DavidLaskerOfficeInsightFeature
Caroline Newson59 views

More from Dimitris Psounis(20)

ΠΛΗ31 - ΤΕΣΤ 33ΠΛΗ31 - ΤΕΣΤ 33
ΠΛΗ31 - ΤΕΣΤ 33
Dimitris Psounis2K views

Recently uploaded(20)

Nico Baumbach IMR Media ComponentNico Baumbach IMR Media Component
Nico Baumbach IMR Media Component
InMediaRes1368 views
Chemistry of sex hormones.pptxChemistry of sex hormones.pptx
Chemistry of sex hormones.pptx
RAJ K. MAURYA107 views
Narration  ppt.pptxNarration  ppt.pptx
Narration ppt.pptx
TARIQ KHAN76 views
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail85 views
Narration lesson plan.docxNarration lesson plan.docx
Narration lesson plan.docx
TARIQ KHAN92 views
Sociology KS5Sociology KS5
Sociology KS5
WestHatch52 views
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan256 views
Lecture: Open InnovationLecture: Open Innovation
Lecture: Open Innovation
Michal Hron94 views
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
MysoreMuleSoftMeetup84 views
ICANNICANN
ICANN
RajaulKarim2061 views
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 Breakdown
WestHatch53 views
SIMPLE PRESENT TENSE_new.pptxSIMPLE PRESENT TENSE_new.pptx
SIMPLE PRESENT TENSE_new.pptx
nisrinamadani2159 views
ACTIVITY BOOK key water sports.pptxACTIVITY BOOK key water sports.pptx
ACTIVITY BOOK key water sports.pptx
Mar Caston Palacio275 views
Class 10 English  lesson plansClass 10 English  lesson plans
Class 10 English lesson plans
TARIQ KHAN189 views
NS3 Unit 2 Life processes of animals.pptxNS3 Unit 2 Life processes of animals.pptx
NS3 Unit 2 Life processes of animals.pptx
manuelaromero201394 views

ΓΛΩΣΣΑ C - ΜΑΘΗΜΑ 10 (ΕΚΤΥΠΩΣΗ)

  • 1. H C 10: . 1. char 2. O ASCII 3. char . 1. 2. ! 3. gets puts 4. " # string.h $. ! " # . 1. ! " # # $ char C " # # $ char " % & " . " & $ # " ! ' # # " ( ! ) % % " 0 * 255. + " % ( "% , & "% $ ASCII $# * , " % % '" & $ # % , %, " % , ($ "% ASCII. - " " . : char " % $ , $ char " % $ , $ $! " # A. 2. ! "% ASCII %! " # % " % % "% $ ASCII. / # ( % " % . .
  • 2. A. 3. * " char &! " # * # $ : ch ". . a " # " : 0% $ % ASCII $# : 0% $ " : ! ' " % , " " " $ & 1 &$& ! 0"% " # " printf & " # # $ % %c. ) " "* : char ch; ch=97; ch='a'; printf("%c",ch); A. 3. * " char '! " # / . " & " # % "$ " %, " & C /* char.c */ #include <stdio.h> main() { char c; for (c=80; c<=100; c++) { printf("nO xaraktiras %d einai %c",c,c); } } * & "$ ASCII 128-255 " " # * c unsigned char. 2. 1. / % (! " # " " " * & " % " % " . % , # # % " . C &% # * " "% " . ) # $ : * "% " 20 , " 19 $ . 3! ! 4! 0% " 19 $ ( 20) # " " %, # 0 (slash # ). " # & «hello» " $ . : char str[20]; str[0] str[1] str[2] str[3] … str[4] str[5] h e l l o 0 str[20] 2. 1. / % )! " # 4 " % " % &% # $ " : & $ " " % # . : 0"% & ( " , " * # " &$& + " " # " % * ( " # & 3 : $ # * " $ # % , # " " " " ( " ( ) char pin[3]={'a','b','0'}; char pin[3]="ab"; char *pin="ab"; char pin[]="ab";
  • 3. 2. 2. 0 "$ % *! " # "$ ( printf) & $ ( scanf) " % " # %s. " " % " %! % % "% $ , ( % "% , % # % # . . ) scanf # " " & . " # & # * % : / "$ &% : 0 * # &% : char string[100]; printf("%s",string); scanf("%s",string); 2. 2. 0 "$ % ! " # / . " & & % # " * «teststring» " «test string» (" * $ % ) # % " . /* string.c: Deixnei tin xrisi tis scanf kai tis printf me simvoloseires */ #include <stdio.h> main() { char string[80]; printf("Dwste mia simboloseira: "); scanf("%s",string); printf("Pliktrologisate tin simvoloseira: %s",string); } 2. 3. ! gets puts ! " # ' & % scanf, # , " & & " & " * " & . " " & ( , " gets " " $ " : 4 " string " # , " , " . 0% : %# %, puts " "* " # $ " ‘n’: "% % char *gets(char *string) int puts(char *string) stdio.h stdio.h 2. 4. 4 string.h ! " # 0%# % " * &$& . 0" # # % * % # # % C, % % , : " % %, " " " . & % * . 0 % %, "$ : 4 " % & ( src dest. + : " ( " $ $ string. 5 # " string.h int strlen(char *string) void strcpy(char *dest, char *src)
  • 4. . 1. $! " # / " $ $ ( # 0) ( . + % " $ " int mystrlen(char *s) " # $ % " ( . 1 " & C, " % # , " % # gets " " &%, "* 4 int strlen(char *s) " % string.h % * & " " & ( " " $. . 2. & ( * %! " # + % " $ " char *mystrcpy(char *dest, char *src) " # $ % # & ( src dest. 4 " ( # % dest. 1 " & C, " % # , " % # # gets " #% % " & & & 1 " " # " % % % . / "* . 4 char *strcpy(char *dest, char *src) " % string.h % * & " " & ( " " $. . 3. " + ( % &! " # 1 " & " # , " " & % ( % "* " 6" # %. : * % & (". . 150 $ ) " "% $ ASCII # ( " % ( % 32 * . ( % , " % %. "* % "% ASCII & # % " % %. " ( % " gets scanf & " & . . 4. ( " % 0. # '! " # % 2 " $ "% ASCII (128-255) " " " # " & " " % " % . " & "* ( ,% " ): Hello World!Hello World!
  • 5. . 5. & * (! " # + " & C " % : 7 # , # . ( " & " % & " & ) 7 " & " % ( & $ * "* . # & " : Dwse tin 1i simvoloseira: test Dwse tin 2i simvoloseira: abba ===== Isxyei: abba < test & " % int strcmp(char *s1, char *s2) string.h " % "