07 Ascii Strintro en
07 Ascii Strintro en
STM
2 Strings (introduction)
Summary
2 Strings (introduction)
Control Characters,
DEL
127
0 1 2 3 4 5 6 7 8 9
48 49 50 51 52 53 54 55 56 57
DEL
127
0 1 2 3 4 5 6 7 8 9
48 49 50 51 52 53 54 55 56 57
A B C D E F G H I J K L M N O
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
P Q R S T U V W X Y Z
80 81 82 83 84 85 86 87 88 89 90
a b c d e f g h i j k l m n o
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
p q r s t u v w x y z DEL
112 113 114 115 116 117 118 119 120 121 122 127
␣ ! " # $ % & ’ ( ) * + , - . /
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
@ A B C D E F G H I J K L M N O
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
P Q R S T U V W X Y Z [ \ ] ^ _
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
‘ a b c d e f g h i j k l m n o
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
p q r s t u v w x y z { | } ~ DEL
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Terminal :
The ascii code of A is 65
(Try changing the value from ’A’ to another character and see what happens. . . )
Summary
2 Strings (introduction)
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
Strings (introduction)
String - Finite sequence of characters - letters, numbers, symbols
and punctuation marks
In C you define a string literal with a sequence of characters
between double-quotes (") - "A string literal!"
This is different from the single character (char) literal, between
single-quotes - 'X'
The above string literal is composed of the individual characters:
'A',' ','s','t','r','i','n','g',' '
'l','i','t','e','r','a','l','!','\0'
An ’\0’ (ascii code 0) marks the end of the string
Automatically placed when you define it between double-quotes. . .
We have been using string literals in the text format argument of the
printf function:
int a = 1 ; string literal
printf ( " The value of a is % d \ n " , a ) ;
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");
printf("%c\n", "Bla!");