21135117

You might also like

Download as pdf
Download as pdf
You are on page 1of 30
A Names Saigam Tain Roll Nor} 20 asllF Einat ! LD Aaiya m . jain. mec 21 @itbhu -aceih Bvanch s Mechantead Le. Tech] [BET sig natured este sate, eh C$ Sal fam Sai” = ~ ZI3S0 7 3 is Yes IL Sum =Sumtt izt+2] z [Sxint_sam ] Z Gstap Maori thie : 4 | Steb@ * Stes t Step@* Input wlueofn fiom user ___|Istep@s Declare vaxiables t and sum of int type J Siep@* set t= and Sumzo | step®% Repeat steps @and@® till 2h otherwise goto step® | stepOs sum = sum +i step@t trite : _step@% Paint sum 7 __step@ + stop _ _ Elochors siya AM ~ AV ue 40 © Cteet ) yeSir Taba hur as (22) value= 4 ns 29a ag tne! — See Ar fo | Tin Ne r T No | Yes. Yalue==£ + + ie Prin t not Paime f IL named 2 “HP sint Pxime] = =0 | yeg | 2 7 spa ¥ aoa Cstep OE intent ilgunithm OF _Step@? Stast te eas Vi ables num, tama valve astnt site Step 6) 2 Anput an integer ftom _usex_and assign this Value to Variable _num Step (> set t=2 and value =4 step Os 4f num =O oS numet point “the number entexed ig not _psime ” SehO+ Repat step@and@ till C cnum, other vise fe to_step | step@: Af numyapeo , set wlue =o [cteb@+ set i=itt step@s Sf valye=4) point the number emleved is prime | steb@+ $f value =o, print “The number Ontered is nok | prime” Step@s Stop 2, Cs Date : ve oie net ix Registers a be of compa ted_memoy used dts quick ty wks S boxe and a clata and jrakeuctionw that ane bein | ased immediately by the CPU. the Hogi tess used by fi | CPU axe of ten termed aS ProcesSod_yegis[ese. _ L iA precesco¥ wegis bes may plo an instruction, a setep | - adasess ox _any data. the computes neede processes d¢isters fos manip 4 lati : 7 ' data_and_a a eg sf ne Bo ding a memot¢ add 62s - | Segis tex Meation ts uced to calculate — the ae the ae insfouct toh vee the execution 2 cunrent inslouction is completed. kb iffeven LgiStPES ade 3- © data Reanter Jt can hold 16 bits f memety . dts function | iste hold _memosy ope Band.” GQ) Add veces Repicted » s- 4t can hold 12 bits ofmemeny. dts fancktan ic te held oddne: ess fas. the mms. oh my latory + old ig bt em Y . 4 t ction i Toc 2 Gcows Tegistas. ie 0 Anctsuc tion Registes 3° it er 6 bits of mem my Sis funtin old inst wuction code: “ete ' o. Poogtam counter + 4t can Aolel ir bits mens fic function ——_—— - eee ee Die age Wo. = i ci sat t - gu? (as 3S 7 a co Saly pe | —Otoepauny Bgpster tan held v6 pits of memay. dic function isto fold temporax potaxy “data. — Aican hold 8 bile 4 Ents Sis fest Tete conag input chavactes. _ Gi) output gators dtcan Bold & bits a 4s aa - is to cay aia chad aclea- a | OO! sycten Sof tusye Application Sof tax Maintain the syctem mesousces and wwe the ~e8@_to tun, fica tion cP tu -| Application cof tua? is buil & fos. Low (evel fang vag es ane uceel while Brok level tanguages ase v towstte the System Softuare. oo used £5 wattle 2he application Sof tart dts agenetal ba spose sof tua ¢ whi & Tto specific pose i i sof twax without syctem software, syctem whit le without app fication 5 cant _Sun- S fp twase syottn always sunt. [4truns when system is touns as pes the ucew¢ tutned on and Stop wh en Sytem is turned off. Yqu€, pO | = ba — ©) Lxamples Opesating System Examples chrame , MS “Teams ete. 3ai0 saya ip ty Sar System Sof tuave ihre ming Application cop tues pry sanng is is aot than application | is simples as (oma ved to ware, S qc tem Sof ware Htindlude StSuct node It int _datats | chat name} int mafn() 4 | = at ae a = te eee clauck node * pt Clo (struct nade); LF we have sin hired ie ha one a a Strycturein the heap 7 a free Cptw} a [* Wow using fyce function we have dele ted the stoucture fom the heab*/ [* and now that pointey ptt becomes dang ng fing pointer”) return o; LE This vay we can coeaze a dang ling pointey to a stouctrey arrair — : “ SP Loxcur 8) seindude Seta. BS SPD include titer -Ne = ati; [i bau thor C) intiso; | cha auth £501 5 __fftuch (stdin); I paint? (“Enter the name I ets (auth)s of the author iP paint C’ Results accotding to yous seatch sn"); Se = while CAbli] -a¢—ne) ae if Ch stuemp C&iblil auth, auth) : i i dig boo R Ci + 1)3 bregh 3 tte 4s { _int btitleO | cheat title D5e1; point C“entes the name of the books Je gets Ctit fe)s mt =o, ct nt=93 oe (tibLt]. act-no) if (tib Cid. witle == aitle) | { cunt t= 1} oS Betusn County ‘word issue O { int aj pointy (Enter the access ion number af the books > TT seanf red", Ca); ame ee 1 Cub Lacal fig =4) oar — | pantf " Beoh is suctessfuly iscyed \n O_ Wb La-47- flag =0 eke {pint cowry, This sah i not avalible caavent fy) } rete int on ag pant? C\n_ new Sect ron sn"); — pont C MA. Display book Anfsmation ”.) § pantf Cn 2+ Add new bok Anfatmation” }} intf CNN 3. List all bohcof give anther") 3 Nook § f pissilicd ete a Vibraty"); I pen “\n_W List the count of . t bi FC\n 5* vist she count of books in° | point i deat a te point (\n\n\t\t_ Enter your choice s ScanfCd Bangle suttch Cane) w __| i Cacel > paint (" Entex the aceccion number of the wohes "5 - ” ", dads ; dig book Ca); - : vaeah; : (Co 22% add (); brea Ay Si fur Bin — Ca e3 8 e 2143 5UP— = Eyarchsn@) /aeaaee _ safer - pveah } ae | ___case ys - — png Cransrg hye: en pitleave rtd ", bti heasevnd ", btitled) break} / , - cases f = inf — in the Eucgpaaciad, “rquntQ) = baa hs : — } 6G} — iseue O} breaks retutn of oT Saifam sain 23s? _| OO | # include | Center the af money You want ba _jnse —- int money _, xe Ward 5 H = & money) 3 a | ey 25 _ = t Lint ees upper = [005 | } [cde to feta ®andom numbex between 1 and __ leo : stand (time (d) 5 | int coxsect Num = (rand 0 *h Cuppes= fewer eee a] fox Cinted $ ¢ d103 tet) re int check =05 sintf You have “tod quesces feft\n”, to-i)s print fC Guess the umbers “) 5 int puss Num scan fe Ciyed", & quecc Num ) 5 Icode te check is she guess Number jc Corset ov nat poke == (orsect Num) check = 15 print £ Cvou 9 ueged tt sight wn"); point? (° Here is Youy wewatd = nd » Beware)» tyes | f 7 to check if theguesc number tc higher ‘tan tBe cousect my che if Cquesc tum S conrect Num 4d ira) 4 printf Cpowe¥ Yous quess\n); Cede _to check if thes aess Nambey ts uta than the correct 7 cage Unendl : ase Che if Cqyesswum < casect Num 44 ite q) L printf’ - Highs VJou_guess \r ee check== 0) printf C' You faifed” ‘> } wetuvn OF saifarr Sai N ZUBSUP GO 4 incede \n ye nd ad fox Cin€ Pao? Cyr C49) = — { = - puinthC7ed "5 ali +r int Rex = psint C'\n Bntes the element in 4chak asray’),” Cintisoj iey; 14) 4 Scanf (Syd", 6 blid) ¥ < ‘ch bli); e Atty | I | sest (4, 4); point f (“s osted Achat atsay % \n ys f | oo ise, ity, tet) _ pnt (wd, bo): psint } C"\n_the mesged ateay ig \n “),” fe Cink j203 Mz 4itt) ie print (“yed"5 ceil); Sot t_ CZ); pind (“\n_ Adtes costing, the avay is An); fox €int t=0, (¢2} ett) {paint od", lid); wetusn o; wo —=—=———_ — “sah jarrah? E 201 3GU PF WD | a include Lc tdig- bS StS int main © Sees - i | i ae u int m; 77 p= if Eater nba afutights you vant foenress “i ; | Scanf (Nxed", Ams ie : int ana Lm; printf CB nten lights in box’ \n"); | fos C indi so) ¢ em; itt) Lccanf Cn", 8 au tis} ox Cint =o; idm; ett) { * if(avy[i]==-1) conti nye} int Count =o; , | feCintj ctl: fimif et) = if awl] == aff) ~ i count +t} { if Count Sa) at paintf C" Boxer having An plica te valuesavesed Xt iti); for Cintjeapt jfemy ptt) : | Ula Lil == awl p) aL all {_avytj] = +43 | point Cred vt" j +1)} { ead (ony ——— } vetuvno; sa kee m Sain ' See, 86 FF include Lctdio. &> int main () int age , S03 tha nané [2003 point? CE nter detrife of the customex \n“) i pi otf C Enter Name: ")s jets Chame)5 tpsint (" Enter zor”); seanf Cbd”, & 50)¢ printf ("Enter fye”)3 scanf (“fad ” Afage)5 if Cage =5) 7 point C’ Ticket price» Rs 25")3 —-fhe if Cage >= 6 {4 age < to) 8 | ’ printf Cvieket pricet Re as” )3 fhe if Cage d= 10 44 age a i a Dogo = int main ou! : pa aie ca a ; a os ie ea ie. os | tine (n)s i = a __ setytn os - GD 7 stove city; @ 2-D avtay ic sequived. dn thic 2-0 - a ja ; tow! will contain acity each, Hence the Fo _ will “dent? the index number gtk city and ihe colons : “number wiff donate the pasticular Aasadter in that cit ane. 20a ays fina ast of tmp ok mats sacomuniadl el epyecer || Iecample 4: wt WAT 7 = oat include — tint ASC33_ Sum Chas * stsing int on) |} int_sum =03 ae foe (tnt t203 ixn3 itt) 7 ar Sum t= ctving [p15 : Zz Lo | BelLYN sums _ _int_main() a chat _steing [200]; point f (Enter astsing ’ Os gets (string) > . il tnt fength'= stxlen (st sing)5 tint asctincum = Ascst —Sum Cstving, Ce th); printf C’cum of fiscss. RAG of stxing isbted” cc setuon 05 I hroite can be uged to print the cum of Accra | va fues of al) chatacters ina staing Y sal? StF Fost? Seri fee, QO | rage classes ane used ta clegevibe_ the fata 4 re ji @ asia ble/ functions 4 Ne ned stot 1000S Gf Cy — because ctotag? class of a vari the dofin es Foul an —___ [vhese tc the variable cpved, dt ale A gfines. pe | default value aft fe ime scope of tariable, life tin! | a_seaiablt 4. felfs us « descsi be the tnitta bized Value of d wasiable sadial Can _a@ess & = variable o ts oe the different aes Abed 7 a “ futo matic &- @ storage rc fat all the _ ae rs incide_a functicn oa hha / they age ned_a_gasbeg Valu? by Aefault es fonover thly ae defend, Og s- Stinclude tare by. teint €; — Sate Fhe pe — static char sbwol ; || oid mate 03 = Pemit! Cady td, wd, we, OL LL Ds ae | } 1 a l output 3~ 0,0, 0,a00000 (nul) | | §t should be uced when we wont the Valve the vari anle to pessict between funckion. arg __kmatn during the brfe time the poop kam. ae | © Rogicters~ This stomge clase declasec ceg ister oe that have the same furctin ality « as that aute vasiabler the onl: evere is hat the compiler tia ate te Store thee varia Sn the veqister of the micyoprecasct | if af see egictes HSavai head Ard impos tant and intercfing— oe 4o od nottd Ros? is {ha + we Cannot obtain the =salcea} a_Seqistes Navi a ble Using poi n fea. # include > = ¥* and /’ treated ag" (oa/ie )* 10” hove came preced tneo ard tReit assachat wits is ebto Rigtt, sa the expaeec ton foaffe te” i __ Description aperatoy | Astoclativity “Function expiessien 0 Left te Righf : - _Aevay Crpwesc/on ea Left te Right Shun tucl opetator ‘ Left ta Right + _Unaty Hinde - Right to LoL Anesement [dec emo +t /-- Right fo eft _ Natu ee add Wee ® Right to he a Mul plication _* LY t ta Right <_bivisien / Loft te Rig | Modulus ‘i uf a pitht ___| + _ Addition + Left 19 Right _ : ion = Le ; tele ace te —— esratea Yan... S Left rte Ri , tO Type cacti ng isa dmethed 4f charging an €ntity == | foun one date ty ote antl or vy Pc sting ro need tomah? vaxiable Gon ne type hiegeat wath Moasianls ge a thes tye tpl le statin ey tg to 7 ca ferig nahh cones ono the 1 an oplta tian gq% finol she sum of ¢wo vaxiables jong ofint type mi | and othes sof Plo Cy wl need tatypl fast ese TT asiapbe ta ft q hot saciable” rahe = | ¢ ‘bth of them cum. i 7 — | There axe 2 typeraf bybt conversion’ - | @_ Lxbhici iE Type Conversion 2~ The bape Cag tin 9 pesferme by the ult og pesin —— the data pe_of the e nh te Anoun acbxph type consttsen. " Thic hel Us to Complete ce containing va able a, sie ee a ees : 7 | int majn) eee fla t a= 5-8; | tL ine b= Gnt) a tlj print # ("valet Pb Ted b)} outputy valulal bic F Hege_, wt Raye exphesty convert flaatato ht: sala, | P87 1A emphicy ale | © Aophi ¢ lon ia — | then the bye cage in is pocfcmed aut tm tically so) —+P4 the eet Ahou t uses é inter Wention 2) £16 — Nown a6 implici {4 type conver son. — At, genes ally takes place at inan Cnpaesc jon mode — | then ane Hata [pe_is pvecents din such condi tian, | typecasting takbs plece’ to avoid fase _of data, tt include &¢ tig. b> oe se Tht maint) { — at int m=4e at . Raw co WG Pfscss valu@oh f is 17 : A er eel : eres “Tt chen susp” isa Ae ee ean om [ata : a — valu of Sum = te et __ {ite ! a 26 proratjon_b | Comberting ARe value s iy te Ascir pehe befor addition,

You might also like