0% found this document useful (0 votes)
24 views9 pages

22bca0171 Bharathi.p String

Uploaded by

bharathip0406
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views9 pages

22bca0171 Bharathi.p String

Uploaded by

bharathip0406
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

25-044 22 BCAoI71-bharathu

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()

printf( "Enlr shing to vevete:\ n')


gets(str;
rev);
paintf("rerese of sting: sln evst),
Void rer()

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

wid vevese. shing.amay( thar tal7,jnt ss)


int i,
char etemp,

tenp: a7 fiJ;
arrl]: a (sis -i- 1),
an[size -i-1] stemp;

Int main C)

char*ar[J: "H:, "I 'am," bharati");


sie e Slx of (a) |Sie of (arrto3), i;
int
printt(" Bejore rereng:in');
forli:o, iesiz ;j++)

rerene chingamay art, size),


printt(" In tter Tee ring.I),

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

MRstten(si)! slen (s))


jalbe;

for (cnt t:0, estlen(shid,c+)


tlarntent)s hritc an[int) strolJ)

reum false;
arri[nt) stnfeJJ**;
[°J4+;
arr [nt) stra
rehun true,
int man )

pintf(In enter sing : );


scanf( s ,str);
printtC"| enter sang >: ),
ScanfC"1s",s 2);
it (arel somorp h'e (si, Ss))
1somasple In'),
pront tc" yes, tt is
se
net iaormopke la'),
retun o;
226CAOl
Bharathc
Aloutptt Thb)yn*ALo
Enter sing : egg
Ender siring : add

Entea sing : eg3s


Ener shng: adol
No, it à not isemerphik.
5 Pin: Bharath'.
eheck
given shingo
la an agram Cach
pgsam;
inclade esingh
nt anagram (char tsl, chass)

i (slens1) ! ashlencs,))

for (iso;s,l)l='lo t)

i4(4rc [$s Ceg-'aJ 2o )

int ma'n ()
char si [looJs[loo J;
pmintt ("entr st sing:");
printfC"en er and shi'n g ),
scan f("y.ss)

fl" The two sings ane anagtan of eachotke)


print
printtcTke tuo shihg ane no tf anagram of
each oterIn").
retum o;
Outputi;
Enter the st shing : bharath Bharahi.
Enter he Md sing: hbanakb.
The tio shig

Enter te shing. sale


sming:sarl
ane not
The t s sthing anagramn of eah ott

You might also like