You are on page 1of 21

SURYAGold

Date. -Page

Wniti a Cprogram f check uwhether the qiuen


Mabinis pase or oat epresesT The m L r i z
n3parse epegnhiion. iuij_Detemne he rangp
ose Sparse mrepesentaim.

Steptheader l
tep2MainuncHon
tp3: Declare a lolio,Touw,tolijbtaleo ,
Stpl nter the oumber m 2 et He ualoeAstmm

ttp fnter fhenumber z Coluons 22¢t he vaues aom

p Enter the mahri element


srCi=b ikrou04 itt

or Coj4col;jrt)
L9cant CLo 4a ljij)
3
ep Check houo mans roe3 ase there in gien.
mai

totoltt;

StepT: print the enttred tnatri


tepg IEC total (Toav *_coll/2)
A

1
P
SURYAGold
Dato
Pago.
SUR YAGold
Date Page

te qet ranspose h mai2 is

j*Djktel t+)5
hanspeseI|Ii]= alilil1 kotal no 3eroes Li 5
t a Spáss mmri1
mt The manspest atere mai io apar
mnrN ii AdL DO 2
reprenaim
3
02

priatla rntt Ld 2ranspaliL


D 2

qetchi

Ourpu.
Enter the ro o TOuos E Lotuung
3
3
nter the mami emuts
2
3
SURYAGold
Date Page

Stepl Header il
pa ZE klsid maln
Sp3 Detlare ama a n value ,i
3p Prnt àenter the 00. elements in the arroy
Usinq Lan:
ep5 prnthenter the lis q clements n the array
Bph Usina locp get hi BE Vau tm ammy
Ekp Detne 2 delau he unutim
wctt fhe insectim 8urk pmudure
Btp 8 Dettre Delm1 & Dettare oa kunthm
to
mnt The' Booted amoy_
icludi (8tdo.hy
nlud lonto-.n>
otd ingert CtnE ber[] t n)

EArr CL)

whijo 4d arrtj)> ky
larr Ci+l = arr Ljl,

brclitL>kyj
SURYAGold
Dato
Paga. SUR YAGold

Date Pago.

tntn)
Votol àrray Cint drrt
Output
Enterthe no. ekmanrs oo th nmays
ror iiAtatin hi Secka amy isIn ").
Ci-o;i i4tt) Enter he elumuts

prinr (/, ale, arr[t)S

3
int man)_ n may_ elunAts are
3 4 5 2
CurScr
InF_ DTl30),n, L i /3 4 5
crine"Enttr he nD elements th oma
Qant( 1d " n )
r i n t tnter h
elumetns n)}
i=n i<n Jtt)
8ton | . d darrrr):
3
printtChe 1O.ra elmants are lo ")_

printt(" ,dl& am fi)


loser Carr )
ormy org,n),
eumO
SURTA Gold
Date Pago. SURYAGold
/Date .Page_

ute a cperamO S r t h e Qwmben


auttk sort ustng ecosin4unuim.
whill (orrC2 arr[ptvot j ddjy=lous )

Step Heasler tL
Ste p 2 int maun
SHep 3 Detlare omayn(Gramaygt tennp = artil
sp 4 her &13e nrmy mm he user arr i
theOnrayelemeots onm fhe r arrl= temp
Usina r loap
Step Deineand declare he uncim
auck Sact usina recusim
tmp orLil,
prqcam orcLe arr Iplvot1_
larrlput-tmp
nuude (3tdio h uick smt(nrr,
laoi)j
tntude {lomtohny uitk8tt CarritLhub)
ud qutksartECtat arrtl tn ouo,
nt hiah
mE pvot,jajtmpi
Couthio lcrSer)_
OT arr (S0),tD
ptvotlouo in touo 00nu eLimints do ya uannNa goTE

paiar C"btnkothe eluments to be Axted ln"

antC d " , darr[i ]


uwhil Cnrri]<= arrlptvot) dd i(-hiub)
quitk Sort Cam D 0-)
itt pnint ("lo Ater tmelumentting qurtk 2mt8 td
SURYAGo
Dale
Pago-
SURYAGold
o10 Date Page
ust is:n")_
Coihn itt)
Orintt(tel, d ir", arr 1)) HInprth.

aeth 8kp Header uh


Tetum0 Man 2uncton
3 Dailare om uariobl N, av[20
GlU nthm
Outpu
ALtim dtnl hm od dulaantum
rou maM Qlemunta do uou uuanaa A0Tt Vaid hellarot (int amL int n
ter the eument3 to be euTkA

4
2
n jt+)
or k=_j- =Dke k=L
Carr Tti2 = ar[k)
Impmetng quickhTo nkd ist i brtak
2 5 else

lemp=arr lkjL
a r k j a r tk+il
acrltil: femp "
SURYAGold
Dato
Paga SURYAGOld
0ate _Page
Speore 4qet the
PESkp5 pilina3Tkd elumna IntmoinO
in
Clarser( ;
Skps btloK 4
Qet thi kn
no.
eiuminAom w
Qet hu arrau' elumtnD UMu
Stan ."an)
k=D k<nkt+)
l t t ( lnfateth 7, d elumintR n 2n )}
Hr lk= 0 kn kt+)
incudi {8lio.h
tntud KLonip.h Sant D, d darr Tkh)
Void hella7rt( int
3
arr[, nt n)_ helleort(am , n
ink i , tmp
eint"C"In Thntted arrau i h'
(t=D5 n Kt+)_
or=nl2 i0 i=il2')
print+CAladlh", drr[k)

Carr Lktí)-arr [k3)


or eak utput
e

tunp arr tk)_


arTlk arrtkt il; ntn t elmub
ocrlkti = tup

yoTtd arrau ls
2 3
SURY
Data
Pagn SUR YAGold
Date -Page_

5 r i l oa moqm to omonklaal tp

NCLud <Stdo.h
S 2Sown 1nCudu Conto.h
T Tep
O Destratim, kotd ToH (tnt N Char CharDChauT
anniim
SDeilau tt a' Chax S, D,T
nl th Number doks ie (N valu
5allJunhm intt C"ThL disk d moue pum , c %C
1

TDH Cn S',D'T
NASD
3
Jo0QaM, el tn>)
DepnAnd diulart wnchD
/on TOH+ (Int Nthau 3 ChbrD,thauT)_ TOt N-1 S TD)

TDL NLT D, S)

use
|InE maln

TOH Ch-3,T D, Lleser)


Prind hu dikt , moyu Ron . C to tN
DS4D) ochtInEntn thno.a dy k)
TbHn-1Z;T, D,3)5- unt d ",NT
hO:
Gold
Date
Pago, SUR YAGold
Date Page

Ouput
ntth th 60 diks 9 . Prararn
dak MA om 8 to T M die
nMDA kom m D t tnclude (3tdto.hy
h dukLMDuiS om Tto D tnuaudu Kwno.h
0ckermoamCtot , tnb b)

5Unc a ommmr tananMS Hunthm.. Tehurn bt_


else elbe=o)
ead pils_ Tekoro acermann CA=,D,-
lee
Stort hi uain untHn
3 Decau thu nse m n) TeurnOcktrmann a-1 atkemam (a,b-)
u Co Ack1uhanns anchn
5 cckermam% unLnn. vofd maln)
in ackermam
Creer )
intaabj-
prtatE (H InEnkr Hhi tuuo numbers aand biIn"
gunt . d 'a4a ,dbl
elsein-=0 prntt " h resl tkeman's unth'm
a n ackermam(m-I s1)
dlo "ackumannfa.b):)
nerum atkimannLh-1,Amn-1) 9efehc),-
3
ethguL Dutpu
HL,2)-A/AI,1)= AO,3)-4 ater the teo nubers a andb:E2

esult Ackoann' untkm a


SURYAG SUR YAGold
Date Page.
Pago. Date

wte a _pooom r &tauk tnat perkuon


pmiVe-tpemlus t h otlowtng
turscr1
PUSH,POP _DISPLA
whtu (1)
:Header Hlu
maio unthm
prtnrC lnstack Inmplumun tonm_prgmm
3Decare denMAX 30 ptmih _opsln")
Dectare vartadi ie t p - , StatkH 4X In3:DISPLAY ln EXIT")
pdnrt" Inl. PUsiHla:POP
S h urhn printt C"bEnln 40un thattu CLto u) n"-
PusH Stant ("od " 44t);
2- POP Builthle)
3 DISP1A-
tit

push)%_
6 bse Suithase
Eeak
4De a hA untho
Pop pu s dtpla E Pops
break
Proaro lapt 3
dusplay
tnthud (Stdto-h> break
incudi {conto-hy
uds edub:h eutto)
# dekni MaxS diault

op -
xet yd puyht)
yotdXotd popt)j yd pbh ()
Veiok dsplays
Vod ma'nl) i top MAX-1)
StikGol
Dale
Paye
SUP YA ald
0ata

Dnnt(nSatk dtull "); Durput


el
tack Mplumuntaho prcaram zr priuhu tp

Stant(d ", da;- PUSH


+op top EL 2. POp
Stak (top=a) .DtsA
t
3
Yid ppl)_ Enter qouTchmiu LLto

Enter fhueumunt you uat to push.2


pHA(tnStatk b mph)
Stack plLmualah0 pnaram n

onin in Deluredlpappeped elumant in d


Statk[top]))
p top-1
3 our chn' CItou)
3
vid diuplay 3

tnt i
1 CrpEEH)
pr'ntt C" In gta ckb emph" )

pri o Stack s 1n')


i op >=0 ,1D entr your thst Cttou):
pntt"ocl \n" t a eiJ).
Dektteted (pdpéed ) elumant in 3
PrtSc Insert
SURYAGold Delete
Dato Pago

SUR YAGold
Eneretac -Evalunhm pesth Date Page

ai untzep nt the eualuated


Atgittn Cpte pestL+
Sep prou
Rtp 2
3 Deciare the unLm OCLud KStdio:h
Push apop E
4 Deune the puchpop loudKconto:hy
yd Dush CnE1) tnCluda cchupe.hn
har Rtmk LA0)
8tac& +ttoe)
Maid push (thar 1D
Btact TtFtop)-
Tehum Stack C*top) 3
ehar pop)
Staithemmia kunCHpn.
Declare thi vanablu Ctops-1)
,nAA D
Deckare pmnter Åe. Neturd
ntt 8(an Qt the l eaprezi m
rom
else
Tetun tack hnp-
hlu *l=lo')_

Cs dutt(xe)
thar eap [2o)}
Char e
2s2eic pugh Cnum)) rine"Entr îhe epresiim "2
Sant ,3 ",ep)
elee
eenp
htle Ce \0')
(Suuitth Case {or
Ci9diqlt (*e))-
push n3
SURYAGold 234
Date Page. 2 SURYAGold

PgU

ett B6
pushCoUm)}_
printt (o h gesuut Hth pattiz tualatom3
S .do"ep Pop)
elge. PoD
erch
toeun DD
De

Suitth L *e)_
. butpur
Cage
Enter thu RPxICRLm 3 ut
ne egult o theEat eualuabm 93YfL=4
brak-
3

13 na2-ntj

brea
3
tase/'

break

Push Cn3)
SURYAGold
Dato SUR YAGold
Pago
/ Date Page.

ht ij
}ap ttAront t=-llfront> rear
Developa propram er gUEUE tnat perrm priart("Sunu un loulnl
oloxoltun pimlhuL OpermN tnset, delute elbe
displa.
Or Ci= 1ont tk=Tear_it+)
ithn
3
ader Jalus Detina oni So-
Deciar'ununnpaz nsectdelte dsplau 5.main unthm
3 Declau int q Cma1 iOE YDA==, 5aont=1 wMh8uü tth: ta umplimet thi Cpenahm
U Vaid isert (O
Poam
CTar -mon-LD
rintt (" Sueu cuuatou")i inuude <3dio-h
Use
loéude iStdlltb.h
RAon -0 too <miur.
deun man SO:
tgear tti vStdiosert C)
uod delui Oi
Qerelements tromthe User vad dtspla)
void elute )
ioe MAX1;
a t renr
ICAront
as | |fwnt >rea nttoat=iL
printt C" Buuaundnan In")i
Void insert O
Delut elemun 1*rearE= MAX=I)
roo+ pmart C" Quuaus un Du"
3 e .

vnel displ)
Backspace Num
SURYAGold
Dato SUR YAGold
Date Page

i on
ont 0, Cdans C
Ycar t t .
oratt (Ente the elementln")}
Scant C .d",dqlrear) prinrt"enn thu ophm :n 1, ngert n 2. tiuti n
3
dplayln
3
rinten Lhatc:"
vnid del0 Stant/,d ", c h )
Susih lcCa)
+Cntze-tllAront Tear)
prin"8uc under Houn)i e L inserÜ break iL
Plse
Coe2 duli) break
CAAe3 dbpai brgak
printt C Deleted elumest b d n" delaul prtnttl'n thm o mr In
tronttt eylront priattC Doyaw uant fo comhinuth J
Qetch C)
3 uwhil Cc== ' y i
qetth(
vtd dsplay()

mi
OutpuT
n the Dphm
rn
Dinsect
(8uu undn ouol»)13
diopkay
nta thiu L
r Ci trntyic=rear; i++)_
Enin th unat2
Doqou uant T Lonhnu#
3 Ser tha ophm é
3
Yod matn()

Arscr(D
Datn
URYAGol
Phgo. SUR YAGold
/ Date Page

DDeuelopa cproqam r umplamenttng cittul


ttas peraoms thu Ldlouing prlinHre r
Osert, délete , dizpla perug
Crti)', man
pontt "Entir Elumnt to 0sertln")
Haormithm
SantCd"4et)
Header ls
COLntt
3 diilhn,than 6Cmaz1
tottonE=D,Tear=L
oud-0
Decla and diuna untims tnsn, dlin a diplau
5. oatn untth
i n t C"quuu underlowln )
tsa ouhl loop taki thui eaniu opnaho
em thi atz. uinq Suuth ta PBe

riF"uh ttd emint u hd|n,4,e 1)}_


C t 1)% ma2
lotlud1 Kdtah tOunt=

toud Conio:h
tdilinn ma a0
vio indert , - Vao dist)

yotol dioplal ( - 1 CLount=c0)


i n tLounte D,t =0,7-l,el k,k pn'ntC qul undntlouln

'elpse
vad toert(
Ctount/== ma12
grot("quu OUnHou In"))
prtatt (nJ,d" qlE))_
k= (kt) '% maz
Date. Pago SURYAGold
Dato Paga.

Nnd maln)
uhill() 2nin chste:
nln fhu elumus to U3ent
prnt qut u munu ln)
rntt C" nt ngert na.diute n3: disRlau
inu.ealt In" L0 2 0 30
printt nEnter _tnntu n") L
StantC 9. " dth)
Gut thcn)

breati
CaA. 2 ouuu:(
oreak
rea

break
dialtipunttl uorDn chninlo")

Dutpu
Qu MAA
L Inser
. diu

eaE

Zan thA elmanE to insest,I0.


Gold
Page
1TW T SS
COAPASS
Date:
2zereise-f
Develop a proqtam to convert INElX ntabim to POSTFLX

notaHmn
play
taorithm
ader ile
2.Decare unctim Pus* POP Piri
3Deine theseucim
Void push Cchor

8tack L+ + top)
3
tappP
CheckfE) empr
Use

Stacgtop--)
10t sorimi-

t(a=-+|| 2z-)
Teturn

Tcturn 2,-
elseCa=A)
relum3,
3
Main tuntHm

e on eapo Tom Uger


Cror eUp jooJ
Use whilL looP
PrtSc Insert elete

COMPASS
COMRASS
JE it C ns opend tManO
push oast thz
3 Clrser
Char p lI001

roomm char e
priattCEnter tha preim"
stirdvde (sdioh econt Cn .3" ep)
ntuad tspe.h> prinre n"2_
t h d conohy
cha Stouk l00)
int op =-L_ shi *e =_ l0')

voo puh Cchar) ECsaloum C*e))


printtC .C "*e)
Stock (++ top x_ el&e C*e = O)
puah (*e )
Char20p elsei Cge-)')
uhilCas papl))l=
else
else
3 Cuhilu CpmrhC &tack Ltpp =miminC&e))_
ain Lc"papl
+Atpriori a r 1) push Ce ) i
' |2= '-D ett
Teun
uhile Ctope!= -1)
Terum25T Cz==AD
KIn D
priat t (" 1C " r p )
reurn 3
3 erch C)
Tre rurn D
M TW TE
COMEASS
Date:
Outpu

Enter the epreesim atb*C


abc*

You might also like