22bca0171 Bharathi.p String
22bca0171 Bharathi.p String
shíngt
|Ain: Cprogram to given wod wstng
deined yuncion
Program:
#include st dio.hs
#inc lude esting-h>
charst[ro03, vevslr[ 20),
int &,j, den;
void revl);
main()
len :stalen(ot,
forlis len-t; >o;i-)
restr Ljt +]> shlJ,
revst[e]:"|;
Output: Bharathi.
Enter stnng to everse :
7erese ot shring: ihtarakB
rehum
o;
larg), word: Aargst printt("
pmntf
s("
small
), taln word: mallest
(lange, shr9
(wor shlen
ds lerg) (otlen(
))laJ
[*), words (omali, srpy
[e])) Cwor
ds>shlen (smali) (stslen t
ktt) length; for(ks0,
ke
[o1); words Clarge, strepy
J);dslo (small,
wor strepy
i+y length=
ebe
[iJlj*J:stingl]; wads
CkJ!:'2shring
[J!:
o' i(sting
(=3!o';
k4*) shrtonltse,
ing
length; jso,k, eo, iat
[roo]; darge [iooJj [tooJ[iooJ,
smal woda char
bhorathi' J"i shgt 'char
maint) int
shing-k> *includee
estlio
-hs clude |pgram:
tin
rath.P
CAO1/
word
st and get Lan print pog7am AiC
m: d
22 BLAol
Srsess
Bharr athe P.
e3
2 output:
Smalet word: i
lengest woTd : bhavathi.
va hiey
Terese the aray in seneoe
sim c pregrom
thoruth
tenp: a7 fiJ;
arrl]: a (sis -i- 1),
an[size -i-1] stemp;
Int main C)
prirtt(".s', arn[:),
retum o;
22BAo (7)
Bharethe.þ
3- oukput:
bharathi. Jle
bhar athi
Bharathi
C pngram to check of
Csomophie to Cach, other nol
pogramiincude asteliehs
ineludee sting h
include< stdboo l h>
bool an Isem eophie (chAr <stry, char kstra) kct
reum false;
arri[nt) stnfeJJ**;
[°J4+;
arr [nt) stra
rehun true,
int man )
i (slens1) ! ashlencs,))
for (iso;s,l)l='lo t)
int ma'n ()
char si [looJs[loo J;
pmintt ("entr st sing:");
printfC"en er and shi'n g ),
scan f("y.ss)