Strings Copy 3
Strings Copy 3
A 2 uppercase
b special character
4 ete
C Number
0 1 2 9
char ch A
binary no
i w̅
I jivalett
compiler
L l
int n 10
Character Integers
Char ch c
ASCII 256
A 65 a 97 O 48
B 66 s 98 I 49
C 67 c 99 2 50
I l
l
l
l
l
l l
l l l
l
l l l
2 90 z 122 g 57
charsales
1
you can do mathematical operations on characters
Typecast
2 Char to int implicit
int n e
SOp n 67
implicit
fewcases
3 int to char complicated explicit
fewcases
dotterplicit
always
Char Ch char
Quiz 5 Cenplicit
Quiz 4 Implicit I
Char ch4 A
s.o.pe ch4
s.o.p ch2 B
Quiz 1
Chas Chi B
S O p Chi B
Quizz
int n A's
n
2 2
so.p a
Quiz 3
Char 0h3 XYZ error
5 O.p ch3
Quiz 4
s.o.pe ch2 B
Quiz 5
Char ch4 A Ch
Ch chars chÉi3 error
so.p ch4
Quiz 6
Char Ch5 A
chs 9071
if
s.o.plgreater
3
Smaller
elseh
s smaller
op
3
Break till 10 20 PM
int c are 21,2 3 Collection
ofvariable
listings
collection characters
of
Syntan
4 String St Prep
Algo
St
i i g i
S O St chasat 2
p g
St charAt 2 2
In
string you can't change
Characters directly update not allowed
Charl St f É I I Ii p
5 12 2
l
l
l
l
A32
2 90 2 122
32
uppercase to lowercase 32
lowercase to uppercase 32
I PSuedo code
void chare ch 4
toggle
int i is cholength 9 74
for
O
che 65 22 Ch i 90 G
TC O N
if
s C 011 Chli char h i A 32
3
else
3
3
a Reverse the given String
Given a string str reverse the string
String
reverse
string string St 4
Char I Ch St to chararay
int SP 0
7C O n int eP ch length 1
s c O N
while SP Cep
Char temp Ch TSP
Ch SP Chlep
Cheep temp
SP At
ep_
3
return value ch
3
of
and
Stoing
int C are 11 2,33 Stoing JAI Hello
É
ink
is iii it
as 0 100 SAI.ch At o
are immutable
strings
String St Hello of
58
4.1
St sa e
2f2
string St Hello engine st.TK
Helloe
for int i O icni.fi 71
St A e n
St
3
N2 T.c
Araylist dynamic array
at 2 3
1 30 to
al add 10
add at
east al add 20 S op Cal sizes
al add 6307
ty
al add 110
S O p alogeta
a set 2,100