Cse Assignment Ca3

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Rall NumbM; RK21BELS2

Nane-uouu Kumo
RLasbiation Numbi: -12 1046y4
and Qtail rd
Hatalaak at hu 4allauunq pucs el Ladt
wrplaim the Qutput
1)
Explamouisn e {ist pusgam
#incluelt <Stiin.h>
t o t olmauin funetisn
m t maun

yau Laou yas hou


declosalian o Vásiable a irt ypl
int a- 10, b 20;
/ pantu Vasuobe bthat ftas oddrA fa
Imt * xaj,
/7 Valus ebill ba copul n buobl p ayed thad tauao
þaunling taua

b / Na t Valuulcof a 20
U %d) a); // t uill uint th Veliut of oa that 2 o
un O
d o main reuor
utput: 20
Explanalon o/ th Sicoed 4oaAm
htoslx piu
cludt < Stdka-h>
auable ap foRomao
/ r e a nthat toki4 pounte

Void unl int ta, int*b S


II hnt a 44tH adday ofaiord bdere HA acldumob
the Volu
/I So it u i l mat chor nything un
! H u *a"- "b ord*b=*a h peth a and b tau fonu V6lu
b / duoln't $ t a thm Voulus o a dr éa ul

b a dopt it

Start a maim (uneicon


nt mun CVaitd)

dularalinn of Vasushu ay ank


inta l0, b =20
Nom Prawer Kuma a l l Namnbeh ¢- Rk21BEB S

R
tnation NumbiH- 12104644

){umelisn tall hat po alne typloa ndb


an (&a,b);
lurcim t Valul aa Onel b uill rot chag-
talling J
lI Sa it uill toa4t Valu a
punty("a: /d\n', a);
1/ Tt i l l pint 20 a th Yaluu o b.
6inC b /d \n', b)3
ukusn 0
/ rol th4 maun unclar
Qutput a: 10
b20
(lin Exslorotian aj th tird raguam
heoslan filu
t# trclud <StHia.A>
/Stost almain umdion
20
// diclasnolion al oxay a chasoole fi aJ{MA
Chat sCrOJ = " a b c

/The Clib91asy furelion Sbepy cobi h^diry


1 So bilous Sbupy (s, deya) code Cop ug "dy into
s

1/ Stemp urelion teakl4 tug ungs as oqunmal ard comha

Caroldin yuiun in Staltmint 4 Dy hat i Stalumin


/!
will bi Arulel alhiuuup i l .
uull"he Sor
toroitun tolh Hi anmlrs aHSEUrg
// In ths
t h a tH 4 Stalmind uuilbe eutd.
4 Csemb (Sisucey (Sy"), "abcdrf"))
pint("H"); Staltnnt uill hM
I A pAMtordidion
pinty (y");
olt NambAt:- R lK) IDCBA92
Nam-13t0uutn Kuma
KLgutraign Numb 12 10446 4 Poga Numbun- 3o
Sutm 0',
ondo mein urcigr
Qulput: Hi
heodur i l
# Unelusl Stia.h>
/Staut o main 1uUneug
int main () S 1 / y a u Cass yog h u
20
declaalian ofaway ajthOnoct tups y l
Chot sC20 abcdef ";
TAR C ay 1unetign sAnupy copuy ¥heun
rda S
l Ss blous stucpy (S, 10') cost capi4 sung 6 10
r o S asuA \0 hot 4 mull

Sirpy (s, \0°);


l n Auncin caleulaly thu Jngth a tN AUUN
blous ull ( 1o) sa it nill hau D lerth
undianS coniain
punt ( %d) ztlln (s)); W/p>ink u r h afS +hat 40
Hatum 0
Drd of mmoin unelion
Duput 0
(V) Eploroion of t h suoglam
huoolsi
# nclult <stdio .h>
Stasut mam umcion
Chans abcde "; \V/delorotion alChaoctv +yh pantnn
*(s+2) - "10'; 11 þounlorn chaolu S i adelud ta
intgtn Valut
/1 tWhch dp rat duutly oLLlLd Ao
I/ Ord cao Camat be ckaxacttn tye
o a to \0.
bint C "/,d")s); // Valul of S comnat bt
dlpployeel 0vd
uium 0;
y ene a moim Jaumeuan
cutput : Rwn ume H
S a,0

A
Name Bnultn Kuma Ral Num6H RK) IBE B82

Riquptatign Numb 1210464 Pagu Mumbn :. b o7

S H n d k u liky hu thbie ol {Ating a lot and u s to Salulo7.


p0D
as u coull o n Hia tobie . He Chm owras
a
Hoblims ad
O k ktuos ywn tua umbi4 nthu fahma sbun
aAkLel ta fuhybtoot th Alland riumbin Om
e int th anpuw. TH fUirga uill torlon nbho
alulign
# Uncduelo S+dio .h>
AncluploStdlib.h>
nluds suine h
Unt main()S
cha stI[20J, sN2[20];
piny ("\n Ent i g 4 )
ets (ss1);
pif ("" 1n Entur sin 2 );
elsCge 2);
int a= atol (4t4);
dt b ato CSt 2)
Casb)E,
in("a TH dyjura sttus Jung 4hd", aTb)3

l w n 0;

ulput-
Nom-PHauttn Kuman Roll Numbn; - RK218EB82

R4Lbauan Nurbu- 12 104644 hat Numb: ta

JT ttt donupt of lnomic mimyaltocolion rd


a a n d xplan d dunee betu malloc ard
ualac. Suppoud yuut Ampuur uwn hlbaf Morply
oluian'
malloc 1 Juallac()
Malloc tomds la mmo 90allae AMondp {n JualUorie
allacaun
Hlaaus He memoy a/ aay- e 4ad to modip
Utud dnd Jatustns all uouy allbcalb
allocotud paol. monn

>Suto
peraytyAY)*rolloe lbyla-si); = ualloc (pte,wi);
T+ When Yau wamt
4d
alocod!obucts hat u t i da e i yaw mmauy

buyord th iimt o eccuilinn oullocotom

Exomplu Examl:
Uludl KStdig.h # Acludi <Stdio.h>
T# Urtludls stdlib-A> J t maunll
Jnt mainl) Cha * pt
= (Cha*) malloe (lo);
maloe (1s* Sigke (* ) ) Scby [hX, "psaglommirq )
y (pb! =Nul)
*stbt+5) =u80;
st= CCkon*) ualloc (s, 2
ir(Valu ofhA 6 n sbcat bbr, Tn ic'); o);
d , *(ptx +5)); punt ("yS) Adolu4p= %U\n",

ulwn0

You might also like