Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
40 views
158 pages
PPS Notes
pps notes 1 sem
Uploaded by
rajsandeep2410
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save PPS NOTES For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
40 views
158 pages
PPS Notes
pps notes 1 sem
Uploaded by
rajsandeep2410
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save PPS NOTES For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 158
Search
Fullscreen
=| waspobl 6) Fung TALS OF COMPUTER. lel TT a | a tthe word _computen_comes ion +the_word_ e wy |_* Comput ate??, Which_means, 40 calculate” Fe syeoriil _atithmetic operations ak high speed, | |? A computer_is_also called a daka processor because it ____ lean store. process , and retrieve_datto_whenevest_desived ____ lo cm patter FS called de ocessing a Data is Yaw material used as input and information ig processed data Obtained as output of data prowsciny a Chanactexistics oF Computers _ DDD Automatics Given o& job, Computer can wok on tt WAL - - : __ G) Speed: Computer con perform dlaka. processing jobs Sn ky. msdn end 3, @ KCUHOCHs AccuMacy of a computes is Consistently High.Hon because of its —secand ili ; in_inFovmati u ca gee oe cages cesctain_inFo —G a ae pares ee ont eee e Pap ieend Tk cannot take its Own decision_in this olegaxd, @YNo Feelings Computers one devoid oF emotions, Their sjudgerherct is based on sthe insbuctions give -to them in the Ferm OF proguams thak One writken by vs Chuman ben | = Chojiles Babbage ts considened 40 be. the father of motea computens a ie Hesigned “Digeeence Engine” in 1222 desi Fu 2mnotic_adalyytical_engine ia el __for_perrfoming basic _onith metic fonctions. © CompurteR GENERATIONS By ad> “Tey: lroday thene axe five Genenations oF Compute, E Ist _Gienenation + T+ was _jiom \y9 19.55 a having vaccum tubes “and_punched cont @sepod Generation: Tt was Prom 1955-1964. : 1 ORs Generation Tt was Jor 196U=1935 Sipe was having ICs with SST and MSL a2 Tt} was having laxiges capac secondary storage. Page C4) Folurth Generation | - Tt was }iom 1945- fst —= TH won having g—1Cs_tuith Mist technology. 2 sei ving mitpacsoe od Setandictr nang. “OSE Sevwations Beis jor gag preset, 7? Fis having ICs with ULST © chnology ql disks an mogrelic tape fp © Five Basic OPERATIONS OF A opens Sete Me ee @Oir putting ° : The process, oF entering data and instruciong ig FO the competes System DP. PV SERING: Storing OF saving datac and instroctions -to make them steadily available for initial ox additional ing _whenevex required. CG) PRESING Performing axtthmetic apeiations (add divide, subtract , thUF ply EC) ox dogical operations on datato convett them into useful information. ee See ng USEFUL information| —or_TESults jor the yser_soch ob O printed report ar visual | display. annen_and- sequence inwakich a ; —921€_pertfnxrmed, _____| Of ORGANISATION OF A COMPUTER SYSTEM. | festorags Unit “Prograr| Zu put _2—>l[storoge [=seurar TS ihfealion {Et _ Gnd, UNIT / 7. UNIT CResutts) Dota | P Parmactg = Storage sort f —> Indicates Flow of instockions ond o- -9 Indveatenthe control ra BIC UNE! | Cer erased bythe convo! ont. tral Processing Unit CPU)(ENPUT_UNIT: AM aperture oF o comperten system perky ollowing Ffurctions + — | —_W) septs Loses Instructions _and_dét pork nik -conveds -these_insbuctions_and dota_in Computes Scceptable. Jorm. al (Tt supplies the_conveded instructions ond d “the _fomputes_ system GF Juorthey_processing.__ —_ DORIPUT UNIT: Ain output ont —Pexjorms the following functions : oo! “of. Com pucten system” — OA oceepts he “nenuitts produced by the computon Ti el fees undexttnod by_us, Ott co t muercts—these coded vests -to_hurnan_occental (neadoble foxn), i pitted seals io adda ocal — — 0 SibREGHE yn The storage UE go computa Systm Moving —___-_ ‘ A ate cod insiniions aeqphed for positing Gecieed” ¢ fote_results Of mracessi ——©) final sesutts 9) po tae ing, bejoue they axe _yeleaned te On _ovtput device senate ——_9l Two. F Storage + ! @ Pri nosy Storage cae J d_tunning program instaiong elysed to hold data, inteimediote results, and esulls going processing o} jab() ee iB ive H ; Volatile Clooges dato On pawey dissipation) oaUged to hold stored progas! ) ten Storage a instodiontre a) 7 Say sused to hold dota and information eres a ic. bac Capo a see tt cheapers thak prin oy, storage. aici data. even irae power. © firthmetic Logic Unit CALU) |Avtthematic Logic _Unit 0} 9. comp ute system_in the —— | place_dusiing processing operakian 2h place thee the actual exe cuti © 9! Corrtrn\_Bnit CC) _7 Control. Unit _of a compurtex_system manages and ——_Foordinates the operations 9} ‘all othes_compcnents qj ———— the _computen_sy stem, —_____ dd Control Processing Unit CCP). S— Arithem@ic | — Tonto =n aa eel ——— — | thogic unit |* an oeesergl ay = | ww) (cu) __ [unit Cp | 1 Tt is_-the brain of the computes System >| Se is resp onsite. Jor_corrtrolling ‘the operations of | oW othen units ¢ _[f system has Following thiee chowctenisticss ai at2. AI flements oF a system one logically wel : : enkS of O system ante comtro \legas r ieve the system goal. [bate | Non=Posttional number systems : Positional numbex Systems @I Non= Positional Mumbert System “| Clhonac =| Use yenbol uth os T For 1. TT fp 1t_f: >for My TTT fe 5 ete Each Symbol represents the same valu xeqadless | OF iS positian in the number 1 {The symbols axe simply addecl to Eind out the value OF a pasticulas nomber >| Tt is difPicst +o perform axithmetic ith sucht QO numbex sg stem GF Pastional dumbest System +|Chaxactexisti cS Chonactevistics i y_Use only O Peis summbole alled digits —— = |yepresent diffesent Values dependin bomb G) The position of the digit in the Tuber tahoe IO. (4) The base OF the numbey system —Chas¢=trtal numben of digits in the runes _systero) —— —2 The! maximum value 9 9a single digit is_aluay —one jess -than the value “of 4 he. ‘ba a | B positional number stern = as 10 yrabals oy digits 1,2 U5,6,7,9 9). Hence, HS bose= 10) 2The _Marimum value oj 0 single digit is 9.Cone lecs than the value of -the bass), =A Each position of 4 digit epresents a specific power OF she base (10) ie use this oumber susterm in ous dayptn= day life Exomple: asa, - (2x07) + Coxio + Caxi0s(6x 10%) 00+ 500+20+ 6 D Binary Nomber System aS _ Chonactenistic: . > qactinenlnomben _Syaiem “T Was only 9) yenbal ox digit Mand 7 Hence its bases! >| The marimom value of o single digit is 1 Cone less. stoon the value of -the ines) =| Each position o} a ligt yepresentg a. speciFic power. f tne base (5) This number system is used in compotens,xcamp lie * PY 8 VOLOtg = Crx2D+ Coxe Cix 2°) + COx2) +x 2) © Page No. = r+! Date TJ Jol Ole = 21, Bo: ss DReprose In ov ler -to_be specific about which number Systern uve Qe nefovring to, it isacommon practice to indicate th base gy | Q subsctipt. Thus, we unatbe \OLOl, = Qhig OBit => Bit| stands Fox_binassy di git 2a bf tn compute teiningy) mane tine OOnrad— on emetonsiting 9 n_bits_is_called an nabit Hubs —2 Octo Number System ics, >_8_ppsitional numben sustem => Has Hobal ymbals digits Cojt 23/4,5,6,4). Hence, its base aa 2 The |maximum value af a single e_digtt is Hone less than | 2 Sine the 1e_OF the basé) 2 ositan_o} a digit vemecents 4 specific Power of the based \ thee ante only & digits bets (29= 8) Que sufficed Exomplle - _205%9 = (2x95) 4 (0x9)4 (a 8+ (axa) = 1024+ 04 4043 205423 = 1044 tOgee Se nose a AS {bate[ | J = A posrtional number —. = ths tebal 16 symbols ox digits (01,9, 4,5,6,4,8,9,, —A, BL, DJ EP). Hence its base = 16 =2 The syrobols. ALB. C046 and EF represent the decimal value 1O AL 2, i lu and 15 ye pect ely > Tht_marimum value ofa single digit i is 15 (ane less thar the Value of the base) 7 Sinde thee ay igtks , U bits Ca4= 16) owe suFFicient —tnacpresert any herade e ecima | nurmbeu in bina, 2 Example + \AFy = (iy 169) + caxig) +(Ex 6°) 1X I56 + 10% 16+ 15x | = 266+ |60+15 [AFe= U3lin Ans ——® Converting a Numbex oP finothe Base tn ao Decimal Numb rN Sg Sums Method: Step 1! Deteumine -the c luna CpositionaD value of eark Gigrt Sep): Muttinly the obtnined -oluran valu bythe dintts in th coxresponding olornn: ( 1°. Example * 47669 = 219 4306,= (uxe®) + Axe) + 6x 3ia(ex2%) = 4y5ld+bUy 4 6 = 2043+ Wes 6 Ut06g= 250919 An a. Number OF MAOTNST cage ¢ | O Converting o Desimal Nmbor'e © Converting o- Pecimal. M ~~ Page No. Divisgn — Remaindex Method (Dae a —Stept the value of the nei base. Step Z Record the verndinde, From Step 1 as the zight —most digit Cleast signiticant digit) of +he new base orm bPot + Sepa: new Divide the quotienE oF the previous Sivide by te Ase. Ble: Rewrd The verinder from step3 08 the next dige Co «nel le\t) Gb athe new base _nombex U Repeat jatep 3 ond 4, necording rerncindens stom vight y let, YL the quotient becomes zex1o in Step 3. ignificont digit (MSH) oP the new bose nombet, Exanpple + B52in= 29 Solution * 91852 Remainders lugs 0 liq s \ 6 iE f Hence, 95219 = 1640, ,O6 Sondeing a Nember oF Some Base to a Numbey of _ f Anothen Base. Metind d_ Step 4. Convert -the original ourabenty a clecimal Number (base 1O{ wadeple sy HG y Sol. & -by Novy 4 thep 2 Conumel: Junee hase . hase 10 Se Snes x6 (4x6!) 4 ~ BABS 244-5 12.04.29 2099 gro base 4 ——______—— _ ; a 4 204 Remoindexs dS 1 3 a : Nl Hence. 209 y= 310 optcut Method fox Converdting 0 Binoxy_Numbewte tks lent Octal Nournbex —Hetiod. Step 42 Pivide the Jigits ‘into. groups Of +hye Ska Ang PAO he ant 2+. Convert each gpoip O| thee binaxuy digits +n Exa a 5 og one_octal digit using the rmethad o} binasuito decimal USL ple. WOl01Oy= % 2 Step|4\_Di ide the binany digits into Quaup: ot -3 staseting Step. Juom_aighct Oo, 101 910 Convert each group into one Ocha digit Ol, = x0 Ox2! Hix = | IOlg= 1x2 perl ay ix 2_ 10,2 O x%11«9! + OX9"- 7 Hence, 1}010IQ,=!1525 rl© Shortolte Method fox Comeding on Octal Number to i. a Nombex Page No a Equivale Binony Homer | a k Methad = I © Conumeting each octol digit too i+ bina, f 5 a st | purmbe Che_octal digits may | Q for this COnveusion). f Step|2s_ Combi result digs. t leach) intn _o ing hina Nombex ? Laan 3 } 562 = 25 a {Step - Con ot_eoch octal digit to 3 binany digits 4 t Se_= 1 26g = 110, 2.3 = O10. ¥ te 2 Combine the binaay groups ] |____5625= 1010010, Wence, 56)g= 100 100105 7 a Earnie eho fox Conventing La Binoy ‘Numbes do j rts _ aa = a i eaDuE le Ax2" = Bio = 344 1x24 ix 4 Ox2'+ 1 ho $3, Dis© Storfeut Method for Converting a Hexadecmo® Norm ot ros Page No. ———— Equivolent Binoy Number Metthad — a ; Bate Step 1: Converse the decimal equival ot OF each —_|hexadecima digit to a 4 digit: r step2: Combine all the uesultiog bin, Spioups Co 4 digits each) ina Single vino } Lon Example ABie = Ko Step 1+ Convex: each herarlecimal ligt too. 4 Light binosxy) nurmbert 216= 26= 0010 Aig = 10g= 1010 Bie - Hig Lol Stepo * Combine -the bina) gxoop -_ pbBig= OO1O 1010 O11 Ey A 8 Hence , ABig = DOLOIOIOO Lt © fractional Numbers > Froctional Nombers gue Formed nombex sistem fai maple’ YIOL = ix otsixo'+ One? = 4+ 2+14+1 x04 2 4 LOL, = 662545 © Formation oF Fractional Numbers fq Octol Numbex Examole + 7 rane DS ssa es uel a axe aS eB puxg-2 = 6U+16¢3 + 5 +4 B44 0. 6254 ok Sigs SH ebas,(2 }a@ge' 85) : 5 sage No. | lia Remaindexts ; au Tel y i =i +e 0]. 68 58 XZ 12 | He Th 36 Cuadg = ClOlOL Of, Ans yee (© COMPUTER LAN GU Used to commihticakte wrth Computers, “Ma hine Language . Poser Bley Tangvage * High= Level. Longuage- ——© Machine Lan > Only Language oO} a computey undesstood by it wtthow ung a lation. progyam 2 Nornially writien as stings Cl binawy 16 end As > Written “using decimal digits if the echt Of the comnpisted being use dl pew mits -this SS Hivelco tochine language nstruction Faamat © OPCODE COpeuation code)» Tk tells the Ompetes uthich Operation +o Perform From the instnctian set Ot the t Compton © OPERAND CAdduess! Location)» Tt delle athe oddwess of the — dotal on which the opexation is to b pexlorme d example : Add \ous : 7 vt O00. $ tH OPCODE PRENITS._Aijvantage * Con be exeatked very rast, _ Lipitation: (1) Machine Dependent ra ———| Q) DIFFicut to program Dale @) Enor prone CD_DIFFicukt +0 modify . => Program: Tt isa sequence 9} instmetions piven to t_ computer, ston i jc_codes instead. wet Odes for-+the Instruction. [Ex sing ADD instead of 110 Chinas) 07 14 (ectrnal). > tH is eanien tn undeustand and use > Ft hsiex to locate and comect ennors asiew tp maacdify 2 € 2 aad O_wormy about adduesse, 2 Edel welocatable 0 > ckficiency, OF machine language te is used For Pine. tone. important Ports of high-level [Te ifieBiony of nssombly tongonge SRST. lachine depender b — 1 2 2 Khouledge OF houdmane suequired > Machine Level coding, | @ Alssemblex_ Pant beta e thot +ranslates asa sembly Language progaan. bi an a compute —facerbly Souk _, “Output _. MachAbae comble Tan | Langeog age S Progra pr gram a Gouuce [Pogram).2ne=ta=ont comesrordenge rogram _ __=2 Mochihe and Assembly Le. : ©_High Level_Language a => Mac! ine independent SDS AGE vequire programmes to Know Onything bau :— sine | Heanal Stnictune OF computes On ihich bigh= Level | B mograms will be execiite cf}, = Dea tn write insbuctions usina English awd ond Farniliow mathe ti i © Complten z 2» 2 Tronsl ere 4 _pmgram (s0F-hwaxe) thot “banslate ohigh-lewd| High -Lev vel = ; i : Language. Lome Output > Machine ] prclgcam Language L Program . a a (Souhce map recy Lemony Ore pondene ( Ob Jock eee mo_P1 in Te Figh-tevel_——}—9| rite for [nahin Langvage. La tangoage tt todo for - {ii Program, Po in high= ove =| Comptterfor Ho v1 i longuoge LO [_ tongooge te] ae —A Computex supporting languages Lt andl2. ‘NO —————4- coven , Machine code for, _ Ee _2y|{angoa et} — "Plthat will ron “pe tarapatei — on Computex A. Program Pt-in-high= ; soe ieed teveltongouge tt. + Compile Fox Machine code for > |E4Ss F SS erg ogebt >Ptthak ttn ory lon_computen B Competent mmpetetf ©| SYNTAX ERROR : CRA fKica Tn addition +p doing translation ob compiles also Outomatically detect and indicate symtar eretcrs.——§ Syetox eduors ue -hipicaliy oF Following types. | Tegal chasactey 4 combi -2| Improper sequencing of inghuctions in a. Pro dra pq Use oF undefined variable names compi ic ery ty LINKER Link peodules of otouge code a they Ge. VIPPIcu rcecute ot onc foo ras io-anite_propos jo some enadulas oo Linke peogenga is agecl in pempanly” combina all sthe object program. file Creates que Saal ese ce pangrar (load mode)-) Intent loge. 3 ae yetoy yetet 1g O high-level. Lan ger4g __slokernend:—OF 0 High=levt q 4 —tcales the resulting aching lave] ———F+ Hig level Language ____| Finke ps ele SpE, Rou oo gram input» [ranslectesan QPF 5 Result gp | SXCC ERED CSourte progyar) eae Peqam poy Eee cong Gea ORS a4 © Intermediate Langvage. les, and Fntexpreto nt 9 Tntepedine Van geoge Compilers ns Tare pe > New fype of compiler and intenpreken combines the speed, ease, Ind corckrol oF both cornpilen Nd interpreter. ~2_Coms| object len Fivst compiles the sowice programtp an Inbertnedigte Nx00+0 en. rd © BeneFifs OF Intermediate Longeoge Compiles and Interpreley > Intes medicke object program i6 in compiled form and thisis Tot oWginal source code, 50 sajew and easien to shave. = New [nkeupretoe compiles inteumeciate pargram in memon, into final. host machine Language pacgam and exeoiter it. L > this technique i. sled _just=|n-Time C17) Compiletion © Advorttages of High-Level Langea es > Mo > Fasi > Foo thine Independert= et to leaxn and use pH wowors during Program development > lcwen program prepanahon cost, Better } Tee documentation eee ee ot“Toloor execittion cFRidiengy. erie legs Flexibility tO _ combo the_computes Oncty an rea steus. | Trebpdsiction 4o-C a OG | Cdmmonicating with a Compute invelue ~{_tanguahe the Computer under tand which immediately =u > Cfs a programming Longoage developed at ATondT’s ies oF USA in 1942. tr was d signed god written by o.| man_nam d_ Dennis Ritchi | 2 C jLanguage isa basi Language etting Storted With Cc speaking th out English as tae Language oF rmmonication’ worth computer. Dinstdad af woutkin g programs, We must Pigst_knouttalhork— | _alphattets, num bens and special Symbols Ox used_in C, then haw one nee combined cto Jorm an instwction. A group OF fash ction would be combined latey of “bo Joxrn op: gua, L [stebs jn_Leaxning English Language « —— —> | Words Ee Sentences _|-> | Panagraphs fits onsing i {ay habets I-> | Consta ot: =I; | digits Vouiables ngbru ctions [ Progvam Spbcial. su mbal Keywords L |Othe CChmacter RAAT 7 A chajiacter dene et i a oles ony alphabet slight OY special cyt) CT} __used +o} represen information, } | a dD. Alphabets -> [A,B,. y, Zand Corby yz] > Digits — 01,9,3,4,5, 6/48, 3. 4 ——8)_Sjecial symbol > @ 9 2 eee —©_Constants.,.Vaniables_and Keywords Se > engtant +5 The. alphabets, numbers and Special. ssn when pr Pedy combined form constants, variables ond Keywords | >? Constant + A_constont is _an nti that does change tsheie.0S la vosiable 2 Vaxigbles isan entihy thot roy change ampitut” geany esas secant it id stored in Computes mero: ns Store-data py memo cells and petri also “ste caloulated values i the mamory cell “emake use of the ¢tored data we need | to gi e ther. nomethe value stored in each location On han ‘the names Given -tn these locations aye ——called yariable names —O Types OFC Constants. Be 2 stants. con_be_divided into tuto major categories: — @ “rimary constonts fi (b)_Becondas constants . : bs I [ fe—tonstants| if Mmdry Cnstai= ee a > Pi rary Constarrts , namely Tntegen, Real and Chasiactey constt mts. Page No. have, event types of constants acertain xe jor Die cl 2 them lese rules aye as undext © Roles For Constructing Integer Constants (o) Bete An _Inteqen co t rust be at least on: ___(6) | tr must nat have a. decimal «© IG digit T_1ass!_can_be—eithey po: Hive or negertive, to) ey e ITE na sign prec des on integest dndant- qtis assum be positive No commas or blanks axe allowed within an_imtege_ constant: The_oUlowable © or integey Constants Is =3736 tp 92764. ms ‘ It can take uptp 2 bytes lbyte 28 bit Dhyte > 16 bit Range - xe = 9'5 bs 2496 +482 =B0OO =F 665 ORo @ (y) 1 es_For rsmuciing Real Constants, cal constant must have ot least one digit. must have Oo decimal point. Lc) Wt could be cithen positive or negoti (dQ) Default sign is positive No commas ox bla al ithi 12% sta Ext 395.2Uu, 26,0, —32,46. _—2In fexpanential _foun_of xe fi con fepresented in tuo postis. The_pasck oppeaning beyonce [scaled momtison, wheweas the pat gollauing 6? et alled expan ot,re ee while constecting 21c0l constange 7 Role Page No. expressed in exponential Foren: age most be observed | Date i e_ exponential l lmantissa_part aad _-th (3) The. | sponudtecd byt letten © ti Te fnoniisaa past ony hove 0 postive. ox negative sigg Od positive _—G) thel expen thong at Least one digit, ubtchng be a | positive ox negative. integer. Defautk—sign-ls postive 7G) Radge of seal constants expressed _in_eacpanertiol fone 7 is =P Ye 3B tn 924 98 fu +3:20-5 | Wiles aa =O. ZexS =e =SIE=5 \ © Rules! For Constructing Choxactex Constants i > Choxd ctex Constant Fave. special Symbols. 7 A cho} acter constant is q single lphobet, a single digitor j a singlé speciol &ymbol endosed within Single inverted comm: Both tHe inverted commas Should point tothe left Wr oam Jn? is hvalid character constant wheweas “Ais not —=2 The _thasimora length of a dhauacten canstant can bet _chawal Ext far 1), 6? 22? alue}_consisting of 8 bits which 98-966 chanactest © THES _OF _C vasiables_ rts._f_pasti culo type Of vaiable ca N_lnold tre same sype. of constant, . ate\ ‘auiable Names| OR ~ —— SAA ‘i combination ie abets, ® A vant escorts +6 OB eomnpiles 10) ER Bee rbeee ; engin 9 hovta eters stp aot he eng Cool be Up AO ANT Ss a fo Gc f-$1-chanactets.0.o—n porte sack ty the rute—6 Py z . rreqessonity t6Ag—v quiiable: names _as_it adds—in_ your! typing (the fist chowactex in -the vcoiiable_ni me._must be Qn alphabe Ox _ondenscare. Soe ee a a ee ee ee ol. ()_No} Special symbol othe tha a_vhyiable. name Expositor ™ bro pop_e__ 89. = C |compilex is able to distiog ish between the yoxtable named ing i F -to © tye | of i name, i use f PrOd var. "> Olc_ke, s > Kegmords aie the words whose m caning has olue dy been explained to the C Compiler O1C Instruct ons. (CQ) Type Declanation “nstbuction bY Avithmetic. Instuction CO} Corre! Tn staaction. aso a aan of Uneies Tete talon below * Type Declaxction Instucttan To _declawe, the type. of voriables used in OC program, (G] Rvithmetic_Peclanation =A To Polo alt variables. aAoy © Cont! Instection vostious statemenie! >} coptel the sequence q] execurtion Peel {Date nad program, Co) Type Declauation Insts ction 2 ThB ype oF data. —is-sed_ao-be_stosecl ina wai Hon. =2 Decloues_-the type, of vaxiable SyoHcs
a will hold hie gh integen. int O,b, 0 3 Float x.y > chaos ch don ble x5 T — asd a b a —s A, Untill You provid ony value tt will pick sandom ye parsing OH alues which is cated Groban Glue Aint asians [10] Floct a=\+ 5 b= a4+3, | @) into, bcd pe2 ALC avithmetic namg on the lett Uo) Aythmenc “nse i : Instoction consists sig le hand side, of = ond [BaraRE pre and constants on te wig Rand St SSS Ses Cone Lenatonts appearing erie aight trond ste op =— TRE =, FON ssignment operators open ator [ |czarb) Bc. Int ady Float kot, deta, alpha, beta gar, L ad= 2900 5 Kot = O.0056 5 “deta — alpha beta. /garnma 32% 2/5 5. int Ob c ’ C= O+b* 2095 Tate ger Mode sastoction co c* bie? Flog 4 5 = xt 3, ys= BS 5 job mo Flock © § p= mori* 9:5 int x= OV3 St | chan ch= He’ Float ye 3 Nome double z= 21666 666 66 4,|_ print £ C” output —Foxmas dy_sting ””, vaxial “[Romat Speciienradeink |, F= float |_prird Q\ a= print£ Ovalue x % A”), —. ‘}- c—chox [ a= 10 | value oF a =10 | volue= 10 | | printf (Poa hd "oy 4 ” aa . | | = Hint _a= to; _/I-type declaxation, inshuction and initialization Pp int £0 g- hd” a): | prick EO \p value. of Ld” fainttC? \nvalue= 4d” @)> g y int _a=105 tnt b= 0; fricke hd=c aces es ” yA?—_e c=| 380 Paes = > fi 6 * mo ” . Output 2| 10t 20= 20 © Limitation ——the_pro is Foxy that we vse scant sex is adr dble to px0 fide_any inp becouse a m = LLinput instruction _ |S ” bing)? . = 10 ou 10 90 @y 10+90 a=lO, b= 20 20 ©!) Program suertax o o £ int o5 ict b 5 inte § | pint ( Enrtont “the. nurabext at conf (V%d Ad” da Bb); | C=O+b; i > Enten -bw.o pumbexs: : z SITE we will not Give o volue it willl take Some | gos bage vole om tS— ope _____——Page No. Date void main () int £ Montene | and_bxead+th_of e vectangle") Beane seang (id bd” SLBA), san auea- [8% ae . p= 27°48) printf 0? qued = Zed perimeben= Hf t ©) Output: enter length and breadth a} xectangle : 1 3 Aue Q= 30 perimeter - 26 (@) Topo AE Tnclude ‘etdio.h irrt main C) 4 Flo hy printf (”? orten basic alory??) scant (XE 9, bs) a= 0.4* bs hya= 0.2* bs 5 Qs- datbs+hra wr ” point&L” GROSS SALARY= 4 —, 9s): (Output. ertext basic sala ys| ©) tp | + Include
Vy scan FOLD BOI; scant Od, & b)5 Page No. ee © 1 [floct-type is_declasted in int type it main C) rE Foot ps a= 9/20 =9 . y 7 pint nent pt fap 2 Then Output a= 4 = 4.5,aE ‘TaE include Zatdi 0. h7 2 r CT z - bs, da, AFG, 985 PES OTERTER THe GRC SHAR WT ROPEES RPT sedint UF. 7,8 b8)5 i dd = 0.4* ts; : Thja= 0.2" BS; | qSl= hrarda+ bs; . PAREC'GROSS SALARY= TEE”, QS); [5 Outpt ENTER THE BASIC SALARY IN RUPEES (RS)= the wejsnd nie 8 program -to_con eat nd point al _—Salution Tneut FE idclude
int main (7 en paint (Ponte Tue Diance mi eunaeiena Gaal scan E*,8 Dien} = [000* Dicm; |—Pfeet_ = 3280, 84* Dm . ce 39330. bem: [ Dem = 10000 0" Dim 5 = STANCE Neeet E\o STANCE Tie INCHES = ZF \n Dist INC ERS= ZEA DrmsDreet, Daccr Dom) 5 cofOut: ENTER THE DISTANCE IN KILOMETERS CKMi)- (Page. ———] ut (bate J e monks Obtained by o student 19 Tir five difFexerck subject oe tROUgh the Keyboard, Find our the aggregate roneh percentage marks abt Pog the student, amr marke that —cart be obtained ty | ire isto — [aug Taput: 2 Talinclude
| 4 a a | IEMEER TAE TEMPERATURE IN FERENNELT= — _—Circle ore inp: nuovghh—the-key boo -biatte_O_ -peaimeten oF the eckangle, cn the OuPO & cixe sjaunce nade a Solution —©)The_lengtn B.breadth_gf o.xectangle and vodis ae ae 4+ include
iat main () v tr THE A, YT, ¥2, 63,00, 05, SUM; Gi J = £ fate f 97 2 Ay ven iO3 ” n= nid; TESTIS S x 5h, print (SUM OF THE FIVE DiGiT NUMBER=%d Ssum);|aaaincroe stdio. h7 : / =< pt maint} int _A,B,C, DE, 14 12278 5, _ NUMBER OF YOUR CHE R THE Five DIGIT G ef ampere = digit Tombent 1S) RRL UROURAARE Reyboosgy, program to eee) Tuomben. Oe Paint €(” ENTER THE FIVE DIGIT NUMBER TO FIND REVERSE cont" didndZdhd”, 1,88,2C ADS), Ti=A; Ac ks EeTh T= B TTT 7 B= Ds Ds 195 7 | print ( INTERCHANGED DiGuis= “wdi ded hdd” 0,8 -C, DE); } Cul put: = ENTER THE FIVE Digit NUMBER To. FINDREVERSE 11a fousccigit number is inpusk though the Keybooadye one 0 Pegfom-to obtain the sum_of-the-fixst_ and last dig numbex, it _Q| this — { Solution ft Truck | i L4F include.
int main) Float M1,Ww2, TOTALS pint? ("PRESS THE ENTER KEY TO FIND THe RESULT”): | [ise res2*s0nnn-o-asfannnd), Wie (0.13* 38400 | TOTAL= Wi+M15 printf ("NUMBER OF ILLITERATE MEN AND iosen= “LP? ToTAN Output > EXPRESS THE ENTER KEY TO FIND THE RESUIT= i fosnd ceed atk naanSolution] 12 Topeck a He include
Hat main () _——+_limt_p 10, psi "ENTER THE AMOLNT IN MULTIPLE ccanty.d”, 8A; Doo- ool*As Dso- 0.07 A+ Dio- o.1* A: printt( NO, CENOTES OF 100= Zd \n NO. OF NOTES OF = hd \n_ NO: OE NOTES OF 10= ted? piod Doe buck > ENTER THE AMOUNT IN MULTIPLE OF HONDREDS=— ANTE He al selling price_of sitems_ond_the.tntal_ pag Samed on them is tpt though the Kkeyboond, wstite a pe +o Find the cost price oF one item An put Include
Not equal >inpot ving = equality opercrbor d [-Not.= Nreqvality eps ae li 1 include dio. h Pry int main O int Q=10; 2 if (Q==10) i ig prints C7 Heo; iF Cal= 10) i ! paircee (PHT); 2 Ae multiple statements needed +0 be included 2 in the if statement -then $ (Bracea) should be [included ond statemertts should be hetscen Bcd >| at include
Enter a_oumben le than (0 Casey ‘Sess then VO, exe OutpurD Statemenck a stotenenk 2 — —fase2j IE the _nomben entered is_quenten-then {9 ene h- Output) statement 3 Stakemenk 4
You might also like
CSC211 Material
PDF
100% (1)
CSC211 Material
47 pages
CSC 101-CSC 111 - Introduction To Computer Science - Lecture 4
PDF
100% (1)
CSC 101-CSC 111 - Introduction To Computer Science - Lecture 4
29 pages
01 - Chapter - 1 - Binary - Systems - UJ
PDF
No ratings yet
01 - Chapter - 1 - Binary - Systems - UJ
71 pages
Avionics Unit-2 PRINCIPLES: of Digital Systems
PDF
100% (4)
Avionics Unit-2 PRINCIPLES: of Digital Systems
144 pages
Chapter 2
PDF
No ratings yet
Chapter 2
45 pages
ENGG-0304 - Unit 1 - Lecture 1
PDF
No ratings yet
ENGG-0304 - Unit 1 - Lecture 1
22 pages
1 Numbering Systems
PDF
No ratings yet
1 Numbering Systems
22 pages
Mirnshin Ardalan
PDF
No ratings yet
Mirnshin Ardalan
27 pages
Preeri Arora Chapter2 First Year
PDF
100% (1)
Preeri Arora Chapter2 First Year
34 pages
COA Unit-1 Hand Made Notes
PDF
No ratings yet
COA Unit-1 Hand Made Notes
29 pages
Number Systems Combined
PDF
No ratings yet
Number Systems Combined
5 pages
Digi Com
PDF
No ratings yet
Digi Com
173 pages
ALL Lectures
PDF
No ratings yet
ALL Lectures
180 pages
C Program Basics
PDF
No ratings yet
C Program Basics
101 pages
01 - Binary Systems
PDF
No ratings yet
01 - Binary Systems
71 pages
E1121 Digital Logic (A) : FALL 2018
PDF
No ratings yet
E1121 Digital Logic (A) : FALL 2018
44 pages
CH 1
PDF
No ratings yet
CH 1
28 pages
Pres1 Introduction and Numbers
PDF
No ratings yet
Pres1 Introduction and Numbers
24 pages
L2-3 - The Big Picture of Computer Science (Part 2) - Number Systems
PDF
No ratings yet
L2-3 - The Big Picture of Computer Science (Part 2) - Number Systems
64 pages
EC 8392 Digital Electronics
PDF
No ratings yet
EC 8392 Digital Electronics
46 pages
Digital Data
PDF
No ratings yet
Digital Data
20 pages
108105102
PDF
No ratings yet
108105102
978 pages
Number System
PDF
No ratings yet
Number System
41 pages
Unit 2(Comp Science)
PDF
No ratings yet
Unit 2(Comp Science)
39 pages
r19 CP Unit-1 Complete
PDF
No ratings yet
r19 CP Unit-1 Complete
65 pages
EA9 - Computer Application in AB Engineering Notes
PDF
No ratings yet
EA9 - Computer Application in AB Engineering Notes
10 pages
Digital Electronics and Computer Organization SLM 93770
PDF
No ratings yet
Digital Electronics and Computer Organization SLM 93770
36 pages
Digital Electronics: MS-03 / MCA-203
PDF
No ratings yet
Digital Electronics: MS-03 / MCA-203
168 pages
Chapter 1 Digital Systems and Information
PDF
No ratings yet
Chapter 1 Digital Systems and Information
33 pages
DocScanner 5 Mar 2025 7-03 pm
PDF
No ratings yet
DocScanner 5 Mar 2025 7-03 pm
33 pages
DR Somashekhar: Indian Institute of Technology Madras, Chennai - 600 036
PDF
No ratings yet
DR Somashekhar: Indian Institute of Technology Madras, Chennai - 600 036
25 pages
MODULE-2-Notes
PDF
No ratings yet
MODULE-2-Notes
18 pages
Solution Practice Paper 2 DLDM - 11zon
PDF
No ratings yet
Solution Practice Paper 2 DLDM - 11zon
35 pages
S1_STRM - MI – USTHB – SEC4_EN_p2_24-25
PDF
No ratings yet
S1_STRM - MI – USTHB – SEC4_EN_p2_24-25
114 pages
Unit 3
PDF
No ratings yet
Unit 3
43 pages
Digital Logic Circuits
PDF
No ratings yet
Digital Logic Circuits
88 pages
DPSD
PDF
No ratings yet
DPSD
231 pages
B20CA1040_01
PDF
No ratings yet
B20CA1040_01
66 pages
Digital Electronics Microprocessor
PDF
No ratings yet
Digital Electronics Microprocessor
69 pages
digital.maven
PDF
No ratings yet
digital.maven
302 pages
Digital Electronics Notebook
PDF
No ratings yet
Digital Electronics Notebook
435 pages
EC302 Digital System Design - MOD-1
PDF
No ratings yet
EC302 Digital System Design - MOD-1
265 pages
Fit Unit-2
PDF
No ratings yet
Fit Unit-2
16 pages
Number_System
PDF
No ratings yet
Number_System
71 pages
ppt_coa
PDF
No ratings yet
ppt_coa
62 pages
Number Systems
PDF
No ratings yet
Number Systems
15 pages
Digital Electronics
PDF
No ratings yet
Digital Electronics
41 pages
Chap 01
PDF
No ratings yet
Chap 01
49 pages
Introduction To Programming, C Notes
PDF
No ratings yet
Introduction To Programming, C Notes
34 pages
Logic Circuits1
PDF
No ratings yet
Logic Circuits1
21 pages
BCA 1ST YEAR - Compressed
PDF
No ratings yet
BCA 1ST YEAR - Compressed
56 pages
1.1 Data Representation V21
PDF
No ratings yet
1.1 Data Representation V21
118 pages
Form 4 Computer Notes
PDF
No ratings yet
Form 4 Computer Notes
361 pages
Chapter 1 Digital Systems and Binary Numbers (1)
PDF
No ratings yet
Chapter 1 Digital Systems and Binary Numbers (1)
55 pages
Week 1
PDF
No ratings yet
Week 1
64 pages
Araland the Ownbaa
PDF
No ratings yet
Araland the Ownbaa
4 pages