You are on page 1of 450
Rs = i80|= PROGRAMMING IN MR.BALU www.balitutorials.com For Latest Jobs Visit WWW.FRSHJOBS.COM SRI RAGHAVENDRA XEROX Software languages material available Beside bangalore ayyangar bakery,opp.cdac,ameerpet,hyderabad. Cell:9951596199 | Software- As ver the ine : _ [digitalized C401) automated _ een called Z [Software . _ _|bshen the software. where ¢ (i ner r interface _ theo it c bs ts nothing but 3 | opllection of programe A pry bs asek of Instrach'ons which ts ole sig he fe & Pasticulos task. _ ye _ Al cumber of programs combiruing_ th. gether uke a | ts single a unk ib Bb cated softiwase ol br seftwase onenk iio into “eo types — 4 dS stern So sofa re — 9 apficatin Software / an © | System Soptwpare Tie. software egy ‘gn for - , general, purpose 4 dves not having any | Omibtin Hf lit fs called system software - 4 System softwares are Classified into 3 types 4 —@ OS - pes, Window, linvx,Unix _ | | 1s- Compiler , inter preter , assemblers 9 skeages - linkes, loades, edtitor: Application Software — [Specific task only ib f u _____ Ex: application Soft wares ase_Classifiecl _ ah ___| nto _4we types _ ne __| © Applisation Packages - ex- (08 office, Orate _ | _ _ 1 @ Special Purpose softwares - x- Tally _ alee [maintain the informakien ie clcwmert format | clatbase Which maintin the | — | Ovacle _ information jn doqsment format | = Py vsing Tally we can maintain the information [ef accounts ————e __= >| A Computer isan elechanic cleviee tohich accept | _ insbucton from user ancl accercling fo User seroled [instruction H produce reu Bmputer Knows only one language te binary lang | _ =| Ags a programmer when We required 4p interact | ith a computer we need a cramunicatin channel calied psograrmming language _.. A_progiamnuing fanguage 38 a_speetitl Hind _ Of isehuctions which 6 Used fr communicale with | corm puder In above cose , _fecpmmenclec| cioiUs cy amemmnees “translator. Aso programmer if the ths tuct came programming (304. , translator wit! pet 7 = _pregsamening fang. code_tnle dings format, and a {_ aedorcling fe even binary metructions Wwe will gek_an ane lication. os Soffwase: Gap _ Commu: — = sha. — ~ Prog sarmes = 6 Gantpoter k Binary [Programmer PY trans taker} —> computer Hf Software] - L ter Translators - A Tanlater is a system software a con veets pro.groun ming fang . Code Unite bin mae frmed Translatets Ce clasfied into fet - | ow © Qrnpiles 4 | @ Interpreter 4 ® Asserbes . (yy Compiler ~ Ib & o systern software which converts : Progamming lang. code inte binasy format tna a Single step except those lines ate having ersor- & Interpreter - Irs a system software which converts _ pregamming lang. cocle inte binary format step by step _ te ine by Une com pilation tales place: CWhen bt error i Occur 16 Stop corp i lackin - pascess) ___@| Assembler by “sing dssernbler Wwe can convert asjembly language ingliustions into binary fost feesae eres As_per the puformane Whe, recermmenckd _ [tb ts compiler ee As pes the development 1 uoise “Feepm mancteel +0 Use an iechespreter ___ FPaogrammng Language | + A._prograroming, lang is 0 special Kind of inilunctims _ which {s Used +o communicate with compeler [oo — Programming Aang. i Classifiol tte tw» types~ | _ High Ke ver, Peg ramming la ee ee ee io ow_devet Preg = __ tye High Lever FROGRAMTOING LANGUAGE _ _ _[ Which programming lang... nlacheadty similar b_ _ ish _and easy to understand ft & cabled high level PL - By using high level P. £ we are chevelopaing __..|User _tnterface Application. | Ex CG, C+, ial java, CHF , Swift ob dive C. in _ _ ® | bow Levee PRUGRAMIDING Lane WAGE [Ths progtamrding tang. 15 also called Assembly lang. Petr Pu 3 = penn ences "3 — | Which PL is syntactically similar to englis ~C Propamming lagaay: “Level procedure oriented stu shutcturech [ars iS high level oo lang: | _ bard easy te unolestand is cattect high Levet PL (3) When the programming language supports Mmoctule OF functor: lenplenentation then tb is collect precectesre| _., Qrieotedt lang Ay Top clown approach in the form of blocks & caleol Stsuctured Progtamming language History OF C 1 The pangramming language term bs slastecl in the Year of 14Sbs With the lang. cable oRTRAN Prom FORTRAN lang. another programming lang, ctevetoped cotter ALGOL (Aigorithmic language) The beginning of Cs started! in. the wat of. (768 with the language cated|tcPl] Marty Riotur (Basic Combine Programming = w® da the Year of 199s from BERL Another Programming danguage is clevelopect by den Thernpsen UE tb cabkd Br langege ( Basic. lenguaye.) _ 7 &) 3m the year of 1992 Deans Ritctue dleveloped C-_ AT ard T Bett lebora- Y @ » preqramm ing language at ories for developing System Software . © Sn tbe yeas of 1978, Ritchic and Kernighan veltased Next version | * toneptage (exe L Lid | & In “the year “of 1988, ANSI. 433, se leaseol next brs ion of C language _ cabecl “ANT-c” CAmerican | cttinaot Stanclaro Institute) fj Asc > American Standard code for information intetehaege. __& capled “8C aa? oe @ On Sth of Dec Jou, latest Vetsion of C fs felaseol 9 |Im alphabeticad oxen eoly the it the name cated “Ci” which having actual € Iharne has * C= language ts given. _ —t - WD | for giving + the name has Crt “there & @ reason _|nothing but pest feotures of C~lanquage. aS _ Ap plications of ¢ C- prograram ing lang . can be ‘tseal fr. different _| type. of lication like _ Baaenees enna + System Software development he Operating jf System and Gapiler. 7 — aa ¢ Application _ software strlen and. EXCEL _| Sheets = |_+ Grabbia felatec felated applrations fe PC “Pc ar (eeemees |e | Fole fanes —— a o Any Ke mathematjectical expressions ¢ @n- een) 7 ©. a pes. above “obsesvation phen we are = ping | -—+ - af 4 Advantages 0 “of C . pee _ _ Pos tabjlity_ procedure Of carrying “He _tastuctions from one system. to another system _ __fotive _ Lu Seusce file Applreahen , file Lfrle fo any other Competes k § Windlews _ Operating System then it soeake property | _ Because Native code & Same. @| | Some sexe file if we ore Copying to any other | compater lhich Contains UNIX / LiNox Os then it ___, doesn’t works because native Code if clifferent _ (So this behaviour is called Platform dependency. L Platfoum clepenclent , Indepenclent. “After Aeveto ping any application eon a specific Os. Lif, we ase able to execute om sane OS then its | cabled Plevé form dlepenclent. >If we are able to un on muttiple OS. then itt & | called platform inclependent = ic Frog ramming dangu 398 - . «+ Plat form dependent , Ission inolepenclent Pl te SE clpesnot depend. on bordwired Compenent. of asystom - fake od Ee bd z Bese cede = St of high bod proyamning lang nob paograynmuing inatusction _ Object cocle :- Compiled format cst of sousce ope 4 cathd object: Cede. _ _— | Native code :- Unix {nstenclient of @ OS is native cole | _ Bute code :- Tava and CH# Astatecl compuol code ars _|cateol bute cocle_ oo oe Saurce code anol byte coole are -pladform incleperlnt Object cocle and native tode cue fplatpora dlepenctent: j ° C programming dbp esn't supports css platform ; application s. OO ee — Moctulority ¢- Johen the applicatinry u cleveto ping, Br same _Mmeduler or in functions then it ts calleol [modutarity - ee _ e | Mid-devel - C programenin dang, & callecl mictite leh | E [programming language. Gecatse it can stepport | —_ high - level language features tp the combinatern _ lof assembly lanquage also. = o | Simple tC Prog cammin gq lang syatachically - _| similat fo english and lirnttect conept, are ae [Quetleble - 4 To develop 4 program what funcar | are reed those ase _callecl characteristics of C eter fo. e preg lang, We peweg Ge | Operaior | Keeworels | Sepe rate rs \Gastant. re-detine functions (Suntan 7 oo — Ho euewerd - St a beseve word, 1 Some Meaning a alteacly ownilable 1° this word 4 that meaning Automatically seognizabe by compiler Lf, else, woid, for, break .-- ete. C2, Operator ~ Jt ts a special tend of symbol fobich _ (pettorms a pontiulas tack: — ine preg- lang, we are having Ah operators 0 exX- haw. 2) _ Sepesatoss - By using Seperator , we can Seperstt An stodividual nit catted +eKen. ca Int prog. lang. total ne: of seperaters are W- exs- wie UN "4, Space ete — 4) Gonstants - Sha a-fixec one never change during | be execution of program _ 30.0, C constants are Cassified into 2 typ pes — 1). Alpha numenic constants 2) Nemeuc constants DELTA [Pane bere ff ___& {Alpha numeric constard]:- by using thts conskint alphabets and 6-9 nos Any data if we are repteseoting | fa single. quotes - . | Mhen it is called character er constant. Xtal ts) _ When we are a the data within the | Apuble quotes then {t Is catted string cstant. i | ex" “freshiobs" “Hello” ———-|__£ ——___|_Under_alpha bec Conslanks we having _ - | ______|only one type of clata voles je char. 4 oo ie _tetal_n characte - _|ase Q56 _ a ~ 6) [Numeue Conshant|~ By using numeric constant Wwe can represent Value type clata Nemec _ ______|eonstant_are classified. info 2 types - oe A |oheger ___&) Float When we are representing the r Numeuc values : | without 209. Fraction ports than it i Colleal « a | batkeger + Ex- 12, -12, 4 yohen_u ase > val eres, tortn fractisnal paats ‘then it) 3 called feet jEx- 12°, 14" 8S | 48-10 alas |= char, a and lo: pat a are called basic datatype or |basiz dstae ements bez any data isa combination _ 4 these 3 types of Constants ww | Pee ~alefine function - ese alt are sé of preimple- mented functions which aie Quailable along with the corp) e2. eee ce Lbohen wwe. sequired to pecferm any Specific task “then woe neeol fo call pre Aetine. functi oft: ex- prot, Scapfor, Stecopy OO, textbackgrocnd ©, gettine(), Setclotac) the syntax of. E_lang. 5 wery Slakernent shoute ends with, . | Operators i- SEIS a speciat Kind of symbol ihich form @ paeléculor task ac programming lang. we are having 4A operatoc: ard [lepenols en no. of eperands this operators ae Claskified into 3 types . Unary Operator te Binary Operator le Ternary Operate r When we are working poith unary wperater ib require only ene arqurnenk er epesancl Bloau takes 2 opera hols anol ternary fs vequited 3 opewands | yOhen we me evaluating any expressisn what japut dota we are passing it & cael e peracicl, which Sefarbol we ase Using it & cableol operator. | dssi ament 0 erator _|side a1g uments: _ soba binauy Dperater. - ipary operator means Tega arguments re left right _ me assignment operator we Can assiga “right side =a _ ve to left s side _yasiable = _ ieee _ D2 Whep wwe are cording _ with binary operator if any one 12 of _the joxgument is Muasing ib gives con eneor = _ a) 4 Johbn We Are Wwosking aisith assignmnent operator nat Siolg argument can be variable ty pe os constant type. _ Jeflisidle argu ent Inust_be veritable type only. |__Sy nay —— LS po = coos 7 Vauable var or constant =a os Ex:- l @= loo; 2 @= (80; Ersor Statement méssing _ Opeth opauion ae. 2 types = (20; [OO = 200 ; Unary arithmetic Operators tt ,-~_ Dinasry Avithmetic Operators _ 4 {9 4 Lp m © Binary “Arithmetic. Operators —— _ i _ _ ° Whes (be are eins f twith these eee we yur . As CAPHESSI EN | contain: muttiple eperatoss then _farcler_ ; to evaluate _thah expression we repuite te folleuss. peority Of oft the operator 7 n>) Aceproting to priority whieh _epetatoes ghighere ite pt contky it shoulet be evaluate -fisst , ay PoE contains least pirority tt shecud be evaluate at last A) When equal pecority is occured , if it is binary left to night Jif ib 1s Unary , right te feft required fo evaluate. | Lb LS - _ { 2 t- _ _ . _ _ ‘ \ 3 = 4 as 2th; 4 (rebun values) po aectae AiO bese Fare B-4 j - | B+ A= 5-443; Y Oe i a vi aeeeteed 2 | U As 2kB42KB; 12 e+ 6 j 5 A= 2+3a2t3 - Hy a | AFE4F3 re | 6 A= 545 Eppon _ [ete terror, Bas4s ; s — 1 a= 73; —— BELATom ) (ke a binary and unasy eperator also. . Stl the stpmbol fs ausilable before the opercende then —____ib|s unaw eperaros which lodlicate Slqn Of the value. = When the symbol & available after the opetanols then __ EB binary Sdithmetic. operators which repusie 2 agsmerts. — ae Alupays EX pressiens required to_€Vabyate Occ. to pena} _ — type conly _—— __ 2? Filan operator behaviour a “operand dapenclent only _ __te fohas “type of date 2 240 passing depends sly — - mM i Oput types rt wosks- ae. > if both cuguments ave lateger then petura ae eleb __ > Ary me _of the arqum. uu ent: ts foat er bobh ase float ___ then delirn value is fat type only = 3 Oudput sign Will depends on Numerator velete sign. aa : inads Value aaa ie (pF any of the argument 6b Negative then Aeliurn value is negative , bell argue = are Lelusa value 1s positive __P_ when we cre working with t, ~ symbols then it works = -cleneminalsr operaior then return, vali if both aw. jntege bo — Expression - _ Return Values - | Blo eee ee — - i mola Lies epetafor E - Reto val ~ ben. oO numeric yalue. _ ee jdhen the numerator value & ‘ess than half | value seily — | O= 15% 3. 0. ° A — A= 2/8; 4 — az lez yO 6 Return Value =e 2 2 1 2 a: wotS/e x2, i | Shen we are wosliing twrth mecttutus ‘opeitar , [2 arguements Qe requised and be — 7 | We can't pple it for float datatype | i 72 {In implemenlation_johen we require to_ . _ calavate remainder value of fipak calawye a a then go for -fred() ot fmed () function prhic : . | dedaed tin _ Z _ Syntax = ~ Value = fred Cn ad: _ -— i) reburn type & Cloetbie Clatabyte - value= frred(nAdy 7 ~ retusn type ts tong oleuble datetype - LT a= 168% [yp 8B = 104% 10 ; 4 [a= toe fin sf = 6 arise fio, 18 _ Os By joy 6 a a a 8 ——s | ae 2/0; 2 oat Ye 10 alays_ provide last c wes _ i a 7 7 | Divided byt 10 abways removes fast [digit of ‘epee vebees. eee dla tional and dog eal tatots = (da Ce a ott, aff rélstional anol lngieal - operators Qt Aédlusn LorO, ee dl te ope js. ue then return valtee | & af “*Presien ® false then retin value ‘h oe - : Every non-zero & cabledl “true When ihe value become Zu, ib ts false 7? Relational Operators are :- [peer ee = Ang ico Opera tors ase sn 44, tl} "Note p- ANSy~ C preq: lang Supports becl cata- - ype $0 Selational, logical. ope alps scliitas LTROE or FALSE: 9) Raranthesis =) 6) 2a ee t Unary operator 3.1 F170, ole y. typo Si <2) Se, Fe Clas, ds + AL Bae! 4 ne Gmiditional © perstors fez Are my Relational Oferators : id { a= 2>5; 0 _ do azsr5<=O 4 21) A> Bog 4 Os=0; _ 2a) Belaeie Siac vate Ones 2 avec 87*t, 4 a4 ean Ar | a= 8727 OF 4 3. az 57(855)<5; 4 iro 5>o<5 5. [a@e5 Ass igri Mew eee ge - Les cemparer comparisisa: 2 epuats 2Li=R_ —> not epuak [ot fm fs > é Lin tmplemestwtisn wher we repuire le | combine rrusltiple expressions L ve ceramencid ge-for logreal ep ily © piegranueing language we have 8 leg, epustors fe) begieel amp AA - Binauy a tegieter = ea tid Cogicat Net | — Uneary | at : (tT 37 ee for LTE OF TROT feels FIT E ea LFF > F PROF | byeru run gee shtwld be called as 1 DELTAlrane. _} bate al aan aus | Ja 4 4 i 4 ° of 4 } i 4 _ i[o © dt © | o| 6 © 6 d 7 A |Aa=579 242<5; O _ - _o 44 4 — fee _ 2 | a>875 &$ 278 ; O - _ 1 440 - — 3 a= 578 44352; O 7 0 4# © a _ - 4 |az5>2 gba <8; 1 “i 444 = _ 5.|asil=4o5 22 of =O0<5, oO a - rajsd 44021 1 _ a © 44 4 _ _ _ - 6. | a-275!= 2x5 44 8P 5522 <5; A — : 2 Ols 4148 des _ -_ bt A 4t 4 a 4 ; | eet { | OR Grmbinotins - {_ A=2 <5 M275 | elt ___ ine _ coco eens a=578\) 572, Sieeeenomeenee ae eomllras = ax a= 8<5ilars; a = ! Olle _ ae \ C2 denit Support _ | Gne/ dee 3) fointer Size (28/46/68) 3 “f we ane using Uaany 0s, gee_covapiles ine | a erely installed. = ——+ OSES dst frog | void main ()_ i : Pairk ( Welcome”) , 3 ofp: Welwme K When we ate corkting th Kibo C cmpiler, by obfaut Standard Yo atoted ancl emnsote to relatect _ predefined ‘feendions axe sepportel by clefault. that's why rt & not Tequied 4p include stdio-h and cmtain heaoler files ___* _|When we are working with high and carn piles, for chery paeclefined {% , covsesponcling header -file rowut be. aagutvedt tb imotude pr else crmpilu provictes | = ning message: _ ee fo _ - pentially main #", void ba Heyusced which (nelic- ing point of an app. ____}#he beat, omy. _ x Jt b pazclefined f ” which te dlectarecl in 4 # By using this prectefined f°, we can print the date on _ Shen we are Working Ulin printf () femetien, it | joan take any no. of arguments but -fiest arg. [rush be sting cstart £ termining atauinents Qu _ jsepenahd by comma __ oe _ | Within the “ ” otewble _guetes whatever we pes ik bring it Oks that only, if 204 -fosmat specifies ” then copy thot type ef olsfe. _@ _ All format Specifives (will tale vide that what type _ jOf-eiska. requairedd te paint on emnsole + igning_ a preg on t © _| Open the terminal and type fouswing _ eT \ wi file dc ae i bey a ‘Ye male _ tepping enable just. press t button é type 4 | prog. a 7 oes a soles | TE trelude < stelie-h 7, hoof ee ink mate _ t ; . | i. 4+ Wf - . I Print} (“ Balutotorials ;_ a | ____ Aeliun ©, - ; t= = 7 op: Balututerials 7 Qi | Press Esc butt , then waite prewing ¢ command} _ i ! ‘ag Ciwstting quid : @ foe errapiliog And Vnking the page, We aE reputed _ fo use folowing ence ecu, _ gee-e File 4 filedc e— © Jo load of execute of preg, we required to Use at fotlowing comerarel “ff 4 eam) ___© _|stdlio-h panvides stanolanc t/o_relalté wedelined _ _ __ [functions prototypes > just declaration mot implementatien 7 ® [ch fe doesnt provides any (mplementation pact of . predefined functions, it provides Oh pactoty pe fe poe [foward dleclakation of function. = | O | wid main fa ae pesvidle any exit staliss back | ® ® _|te the as. tn Lind main fo provide a chats back fre Success Os fable _ Uf We axe. Asgueitedd ‘bo provide | exit Status os success, | [then ret Aetien value &s 0 te sotiye O 5 ee Exit-Success _ _ ©_|phen we are sequined te inform _exié stats or failure, | _|then relwe vate is 1 fe return d > _ [Token __ oO “Shnavlect part of programing or an 1 ieclividuat ‘park ot __ pregrammlag B caslect ____ ® JA © prog. 8 a combination of jokers. _ _ 7 ___ ® [Tokers oan be 2 Kexcoesd, eferoor, sep ott %, eal le _{and any other identifiers. ee _| @_|pgyhen we ase ee woth tokens we woe. an a —_— — eee |en ls pint. (“Hebe o -rintf (© @ @ wel 1 . itt (&pd Heleome 7-4" ID,20), tf Lpridtp (“ved wekomered ", 20, ), Eroor rd | fon call musing ae | _sepereror then, compiler waeli for one more a | “zd weteemne A", 10.20) pavop eels | musing 2 ef be Condwelcome wd, 10,20), we, | _ IO welcome 20 founs a a - 7 oo Jn printf Statement when We aw posing format ae Spe then at the time ef execetfion auete matiecitty pa -foctoet spectficer oe seplaced Loith comessprreling value: _£ | painte Clndzd nd”, 1o,20,30) ; 7 102020 re clarity t 2 printf (“Yd wd Yd”, 16;20,30), — i : 10,26 30 — 3 print (pd, hel tod", (020/20); _ JO) 207 30_ _ => __ Nithio the deuble quotes of a peer exerything is - treatect like nermal characters only except formar specifiers g speceal charactets «10: | printf (“24329 yd” 213); in | printf Ce ped %A” , [v0 260,300), 24325 G exparasien wil asbue, value Me printf (eel ted wd”, 100, 1 200), = __ Joe 200 © = gorbage | jaunts value 7 _ 108 ov Ok ___value -then i bring seme enknown or Uendlefinadl value 2 Oo palnl{ Sfatemend when we are pousing oun tienal ~pemot specifier wht Ep osn't having epencaponeting | Caltecl garbage (funk: | {—— iW : 4a patolf when we are pes aun additiona! elu which cleesn't howing corr sponcling The basic ciffence bfus dedasation and ia lof & yartadbte ui ee Jn dedaration of the variable sle_after_ | os _awiqned _ 1 J | __ Carwersigrn eave Aeauetreet -fe -feltow 2 sles — a i cenolitin | | oledatype Gh dhe vasiable —_ | acating the memory tt tts garbage Velue _ lntil Wwe ar assiening He dete | in fnjtiatigocion of the vasieble oftes | Cesatiing tre mm bydefuut ib stores what value —o OOO OOOO _& Open the teminal anct waite the follecoing fo commands ee eae Mt fite 2c - _ _ for bnebling typing, ptess t button #f include . init Mato CD oe tf. fark iy fieat f i Se 2k, a 4s Ble; ponte (Cte fed f2he". 6. Ff): : sekurn O; - Le 2 ‘en ress escape bultar then type -fottewing _ i commanel bea [Compile £€ GmK : gece ~o filed filezecr _ Run[doad: _+/-filer i rp. (Fag Se eed) = ofP {a2 42 A opcere | Operalpr | behawiat uw _aleporys Operant | depenclent ib _ bay he depends on ton peut values saly Se of operator, will be a changed Return Walee behaviour 5 always Vauable Cleperatak ale = _ oly ne depends M_\Variable type ‘eutormarticatley | sete valve wil be changed: _ en a = Wben =the. operator 3 Opes rekiun ing. an jedeqes vee ancl we reéguind + store ig fle Yawabe | then ante ractiog Ly relien value will convert _Lik tote -fleot forma at bp addy geo “| Control Flow Statements __ = The execeetian flow of the Ped: ts unter conbeel, of csntrol flav sta hernercta. In €* prog, lang. centre -fpow shtements ae _ Uassifreck ivrto_ Stypes __B Selection statements, ex t= ebse, Sf, elseif, switch » Shuative Sfatemerts ea- whole 1 for, 0 while, d Teamping statemenk | Ex- baeak,, continsee ; gete | Selection Sialrnents >| These are cho called alessian making sBlemenh >, By using them, We can crete Coactifitnel orientol _ tock - Phen we drs Working With selection shtemerts f cevclrliin & Tere then block & sxecestict If Conclttien false then wereespencling bleu will be tgnesed. pRars. pg Ne. J Dale — | Sgatae ie = — es - — a pC Coondition). “7 Gencdition) - - 7 3 ye eae at 7 sbhemertt ja” SF alaeae Stakement2 ; _ =. 8 & aecommenctec fe L use sehen poe having multiple. sfatements Gostncting the becly a esoays 9 risnal | Spa tog fe stitemend it doesn't ts wush Stora Specify _boly, te boy not meertioned then chal ope ts_teaminstich with noxh serivetor - Else i else ts a Kespeooral, by using ‘this Kerpusore| we cen uegte adbtemate ‘block of if conclition | Using else ts glwaps options), ib is recommercded i gels alsa . |4o use tohen we haying aHernate block. | When we ae Wesking with if and else , only one_ block can be execertect se (phen! if’cendition uv false. hes oly Celse’ part. execestect —_ i$ 4 tax | ® if Ceandition) \_ + +f 4 }! | baths Stakomenti# 1 intip = + mail| 4© — Statement 2. Statements \ else” - mattible Ny alse. | siatémendy — LL Shabementa ° sbalemert Y _ ¥ : __. © it Canditin) ‘ _ A)" Ceenedlitien)) 5 eee {Statement 1 #7! / statement 1,21 as ( oe - - gy ase oe Sy Shatement2 ; Statement2 ; — Y it _ pent : to | ese S _ if -s / else - ms WARNING Message When Lf (484 (DELTA rane.) one tJ - | printf ( (ilielecne”): ——E _ _ - a Ps ABNITC Welcome _ _ Note When We are. constrcting anip aordditions top ‘using Constant expdession then Compiler | provides a _ _| POARNING messAGe Ce_conctition baby, ‘Bue av False _ a When -the waraings are. occured, it can be I roped if ie * pee le box f2eg_can be. execute prepay — oon iG ROG RAR, _ = i aon ®@ voit main’) _ _ — é - - _ - = ——___} prints Cui) 3 2 —__}| if (ats2 os: 5<8) i if (l= ille2 =f) of loeo @ “wed main 0 a printe (“delle ds Lp Casares Cate ie : print CHA. 2 If scape # else bere eos | printf C"B!") _ ___ printf (ie) . _ | ) 9@=D False _O/P : Hela Be Dhan the beely is nob specified then auetonetieally . _ Scope ts terminated with oext semicoten 1-2 toithin __ the Conclitisn only 1 shtement. toill_ be placed Vid maine —— == a. - _ 2 priate Cronin) =e i (255, =275) Y CALs 0) True _ . fd _ printf (SAY); _ E psintf cKe") ; _. a _ else _ 7 _ printf ("c "y, _. : printf DB"); if = o/P:. NITAS [DELTAJPo no. ae [este dt & [wid main) ___4 fpinty ¢ " weteome” J, | crs aa : print (oA, ee pest ee pif ery Print (8 Doe a eo a — ~ £ as — — | UP: Welcomed geemeae) RANG iolkmon7 Came eee eee ee printf (8%), ao _ | print iey, - priste (Cp: __printe Cini Ove: pecNit — When the. bndy EC rind fl Bry oe a — _ welse ——s ak © primus ESNIPS, aa hn PPh (Nee _ a 2 x * |. _ [Of P: ABS Erros, misplaced else jf else _sepe Stark my aftec if Scape an — | Accencting -fe syntax of If: else when Ue are Using esepart dt muh be. fepuived fo start | Lofter if seope ely. : Conpitionat (Cp ennrors Cero | ee ~ Conditional cite Operas ane temary category epatahees. 2 | Berna Categosy means it required & arguments , be i bet, midalie sightsidle. Arguments. 7 | When be. ave working boith eenclilienal Opesators, if lcend® % trae, then relewns with nvdoll arg, Y con® & false, then relamns torth Aight side arg oe [DELTA [rg ne. (Oxte_f | and loft side “aequiment is breates) bike cerctiton | : According to syne, if exp 5 & true ¢ bs leftside [ |B eseitten relu med: = { value = Expd 2 eapa Exp 3 L z R od value & tm |= 3040 then exp 2 es middle (alue. lf expS 1 false 08. >s_leftsicle. Ne eps os. sigh side value @ retarned: : When _we are _hotking pith conditions opesabrs, tee. ji _| teguntee to sabiSy -folceewing. condlitions — | D_No- of 2 and shoutd de egual._ D fery_clen shoud match with _fusk befae 2: (eee 5) Every _ followed by Pomly afies m 2 Before | wre 2 2K _ - 2<5h=4 eee eze ee - | L a Fatse + than aight side Tue tun m (30) 4 ae fo_maumbering process, “for vey - __jaepuited te Assign ancl fas every ‘2? connespending Pj Ihe we aw Wort with, cube 2 oan i en tnitigfty te aesyuise +to_esovert -the expasssion unl ai 3 Ree en a | sda caoler fo convert the expeessien ierto 3 acqysrents, B_Aacem mended fo pllew Numbering System | 2 ere tonique now | no. reguusiect to assigned: ____| Upp ash ques nmek, if B ceded Heit cugeerment afrer st 2, bY Ist 2 conresspencing § show de_muble. cegerroent ant remearning complete part & Right side argument _ oye 201 80/40, Loe 4 by pi i j2 si {or pHi | bon igi da ise | 28316 i ow ! 4 pac eae Re ot O12 S>t Lgdg ee TT! will fncrmase, | The bawic delvailage moe corpbitinel wpe Bo _| peckterng coating pat of -the pieg- _|When we are Sedlitedng the ash then occupies boss memory Baste cnorticalty pana a an max ole sys 50; Zs 20; _—_—___—_j—___ Prrerrs Zo gg ae a mae ey eens ieee eens Yb Max vale is:5t _shorrnmarchd fo Creals i'n optional | blocks 61 else fost: a - _ a - Caib &y wig else pat, Wwe can esealk cnly 4 options). aa 4K if oe _sepetinud fo cyte fm then recemmencded -fo ge pe Chaska Note : Ln previous peg. , 19 plae 4 writiog rut ple Leencins_wwe can _cseate singe _staterment, _tohich can *& vold maine id Unt «4,2, aX, X25, ye Sd; 2 26, max= x7J44X7z 0 ery > Ze yiz,; 1 Pata CC ax value & Zd man) y . | Nestes fete = — | St _& @ procedure of Cpnstructing a cont toithery witty | . an existing ¢ Conciitional block. __ RJ € poog. lang, , ik 4 possible fo Place upto 2ss = oe Qestiol Mocks. aoe =| = eee (1051 X1, Seen 7 oo if Ceenclihisn) ~ - ee 1 Bleck ¢ #7 — ti Cemelitieg 3), ann = ~ “BlécK B; > ~ [Bact oy if. con ion 1. ia Cue _1 ts exere tf it lb false then contro) twill pas = __| fe ese. park. a ——_ | Within the ele part i cenclition 2 | is trae “then. ee block 2 will executiol | wit poss a a Within the es cet a | block 3 will one centiol if it is false then block 4 will er cto be. execute: _ Hi Nestect eoncephs can be. Leapplitedt {for pat ord _ | ele part also eee olf oes cxpplying - a nesta concrgts 1 te “if pact _|fhen it 1s cattle nesticl rf-else, it te are applying en it & callecl ele if Golkter + -_ int a,b,c, ol ,min elrser (); | Print f C4 enter 4 values : ye Scand" pa rd rd" ta, &b, be, £4); 1 Lip (asbét ae $4 a? fea preclefived -func® sobich b eee fe cenio-h , by Using this fone” we can read a » Daracter fen Keyboasel- 2 | Genesal ly geteh feen® We are placing at end of ‘the becky becarse after painting the setput , ib can bold the scfeen nil we ace. passing.any Cherscler. 2 Input. 7 Note: @aio hw a Compiles lepenctent_headler file te an all the cerapiles beesnit Step pe ths cenio-h ust : eect he — When We ax using comments ie the preg then mrt that Specific pot of the preg: & nosed by cornpiles dling > Generalig cemmerts are used fe proviefe ‘the Aescuiphen obeut the _lsqie : y 7 Sa c proguamming fare. we having 2 types 7 copnimenl, fe _ ) Single line > murh- Une _ DELTA [Pa no. Alan] (esto 2 Single Utne comments can be pice violect by ebing Me = |Mutti Une comments can be Provided by using ee ae La a----*f —_—__— —_—}—— | When we are cboviing with meu oe | comments ions then nesteo! cormments axe nok possible ie coraments within the cormment- — R | 7 | on previous prog... in_placa of sing nested if Use_We can Use single slatement. tohich oan pris — an Saeeieet retty ae aléo Jie. anetthimal_ opts *epina— to Use _ _ _— Prog, | eid marin) _ ae ae d, min peta a 4 dates”), | anf (xed te wd wd”, fa, £b, he, ead oo Tesh scruace 48 acd Pardsedh bed es tee eae ee — printf C1 mio value fs ' Ye: gethbo, _ ae x OP. inter Yy “volues: Je 20 30.40 Min value: (0 = ty bill value | Seria) No. consider as ARZT - : »| Tariff data is 1-Sb Le ae 4 —— BI 150 BS i i _7= 351 oh : - - _ BE inolude a _ — ae HB tactude = prea) nonits = cread~p read : i if Coanits > 26\) eae L {_ - - t= nunits ~ 260 - ops = t* Eso Math aps = Ips + IO S60 WUr3sd tps = ops + [on R350, “WUt3tied 5p eps SORLH ap str tut f (eee ele fe Counits 7 = (51) ops = bx 5-00 [I 30d rps : “eps + lor gag, M3r20Ad ii | ___npserps psp% bas If atat tel —— 7; ee a ebse_if Cnunits >=s) ae = a 2 — ~ pumice Pe t= nusih - so; tps = t* 83455 ops= aps t sos it vas — pe = Zo Else — ips = nunile ges — : caps < 48) j YU Min cmount ; _ vps =p res* 1236/10) poet. (i Teta] Anaunt 2 2 -2f \n" Ps _Pvintf Cinveltal crac _value\n!)._ Oe: Enter sno * 45s) Get Mt Run [oad crnmand: +/ebitl Eater cerrcent bead} Thal Airmoeunt > 44.44 pe arirpeped * 4 lar miner * gee -o ebilt ebill-e $ [o34 (DELTA fran. ete ff 7 —-4 ee = oe 3 | get of_insliuctions _trrbe the Conn piles aye as 7 | execute set of statemenk until the “ tenclition fe became false Ub Is catted levp. \ = = ——— — eae — 3 : | Basic Tas pose of leer & code repel _ TS fi teplaneriein hoe pas am _—— teguirel then feceromenclaot 40 90 for Isops. 2 _|Cene: itera He stabements one trop be 4 coms of “the fepetitira ams 4 Circle. _ r 2_[Snter piog.lang.. Isops Ste _classfiecl iste 8 fypes » while Lemp _ 2) feo (sop _ 13) le~thile loop _ _ © lohile loop a _ e | when Wwe aes “westhing ‘toil “whie Yep pre che _ _____| preosss 6 eccuserl je before execution of sfetements — _| block conditim part is exeaued. e [hie Soop Cues fepeats tn clook clivectin. Me a Syntag = ee ; _ Assignment [aeseeeneeeree ee swohile Comite) \, rr D> Ace: te syntax “chile” tend. is bite then __Lentre| will wwltbin He bedy. - 7A After erectetisn of the becly onee.agasn comtm! will psss back +2 the csnel* ano . Until the cenckitien be came fous Booley will be repected 1_RO-_ of Hires. | centro! will pass oursich of the body, if Ade is not fae , then tk becomes an_ in rite loop . Noid main Cl) a8 ae reek _ Tabi, venks ee Cah | pohie (is 4 _ printt ("mdm 5) y + tt; $ $ Of 2579 | fo conetition f conn exaluatocl & tue then _ | Aes exeeyphion of statement fyvck emo) woitt poss __| to_Heration , 2 frm iferctin, ence. agatn wit _| block! @nct iteration only. (DELTA [raw a (bate | a Sauttay — _ for. Cinitstization » crnclition ; iteration) skutemens block “then WE Qe roaring twith br lop, always execute 7 proces will start fem initfaliscrhin- eeeenaree —f Suit lisartion pat will be executed goly once apie we are. _passing the contol Hbia the. body ust time. Afbes_execution of inihta lisection pack conkel toil! pase Hel Will pass to stelement block pes block do cmnelition- _ _Alwcaeys repetition _ will sme b/w cont, shbmenk | bOhen we a teoiking teith -for leap, ev evrything optional Det dot _manalatory te plast 2 2 semicobne | teplaceal woith nyn-Zzeee value (When we Qe coo sKisg with, fos. toop antilock direction . " _t. Alleooys -prechecking s eccues when wean _wosking With foe top te bY execution of sbtement block ord” pat & executed + wr hile (oy) —>_No repetition for 50s di 45 eill Fepeat Yen - 1 - ; © bon for hep : when of cone” pat us replaced! With Z | concland 0 then tt Tepeah nee , bez ne. of Inskines Beene tat the time af Comp lechin . | —_ _—~ oe Ls Gna past. shud be anst_O - - or NULL peta. yartable- [DELTA /Pa No. Dste tnt iy fos Ct 4 . printf Cd ide ke ca - O/P: 1 35 #9. bt pet tf I~ do -phile t- In implementation rohen we requirect -fo repect the shliment block atleast once then Ea fer_dle- while loop. | When we are poosting wlth ole ~ while [ovp, pot chesltsing pAbetss # Occtitsy je Qfter execution of Shlom- “| ent Stock , “trrd® post tb execute When we are wo shing lwoith ole~ while Isop, i | Tepeats In clock olfsechon . Syntax | i iam Assignment - _ do - 7 a p. oe — Statement d ; ~~ statement 2; a aoa BO a ne | Lee 7 — _§ hile Crclitin), enol of te body. paeeeneeeeee | Pe eile, ery mut be equal oF | [ | i _. - “| working with while sop. os | [Iperemert andes ‘osdlee 2 Assignment sfalement Sheed Contain trun, valtte o7 G@naditicn LOOX § ) fetatim = Add CH Ex: (24 6 8 10 214 16 18 20 @ | Decrement Oscler o) Assiq ninertt > MOK 6 Omditin —» thin * sellin. 2 >/> * Cotrot > -sebC Task 4 : a _ 24 6810 b WY fe 18 20 — . vot main 0 — - — 1 _ int ty M jviiothy garbage Vole t= 2) a while ( (<= 20) { print fC" eds i) void main 0) fi int is iv 2 while (Y>=21) j > f-2- Paint Cpa ie MOI matin () mo oa nb i, n, count =O; _ | eliser (); - pimp (' Babes & valite 2 senf C xd” £a)- a ie . = i (is 20) a . 4, = ee paint (Yd " i) — 7 count = countt+ 1; | if Conn =7 3 EF ils 0) _ ae? . = printf (A yod ", itt dy ee _ count = pera coe eee te toy ' : a - f — —~—- }- = _ Gerteh O> - : aaa |= ee ae *Frhenace Sel] a Frog Enter a value : —t ol esse a BY 55 09 void main 0) 7 i _ _ . paceeeaaas nt t=o, trib nya, a” iy ts Pelt (Boker avales?) _ ima Seo Cd Boys _ _ print ("Yo nd”, dr), _ If (070). ~ priv (0 hed hed 2 Ps Zri he tez a poesf (ee pe \ getch Oy Nccau't (td, Ba) g ae a ite_a Prognam._ pact fest Dn. o. of fle= oe nace’ _valetes. | tow many values you want tp print Pp — IS ff: O11 236 8 13 21 34 ss 29 [YY 298 att. ac en ae a :| Write a_ptog -to paint fibomacci series b/to Given HOO input vatues. _ Eater 2 valuar: 10 200 _ {3 2) 34 ss 84 {ty _ _ i Eater 2 vomes : 5 200 _ _ _ sie ee el ee meee? a Oi SS et) 0) ge eee cece ke | _pai rtf (Hour many values Your ue Seong (S¥d") fn) Xe Of err pene. HE ye a a = ~ Men, — —_ a - = [ze xy fetes neceentate oe Auto alignment concept [PENA Enter no- of rows : lo Enter a value: § saT SS shoe th tnte,n, bs 7 elrses(O/ _ __| _psintf ("Enter no. of vows! 7), Scant ("td £5); ip(r>= 4 44 ¢<= 25) | aman | printf (" bela. vatue! "Dy | _ i=4; nn (t [0.20 (ni, n2) : IE 10 12 14 16 18 20 _ - a — mo _ ra Gey Enter 2 values | 4 20 (nt, ne) - © 14 16 18 20 Case2: Enter 2 values ; 20 [0 (ni, n2) 2018 [6 /4 |> 10. or. _ : Enter 2 Values: 24 {0 (ni,n2) 20 78 16 [M4 10 Enter 2 values 210 10 Beth values are same _ _@ | When we axe using € #-2A 4 few speether_p en tt (DELTAJPam._) | poe 7 elsé _ - _ printf ("invalid now vatue (1 25)?) : 7 aE 28 Cb) ee $ el In puctf darement when we av x nad Fem oe specifier then ib inchcates that 2 cligit clecim _ Values Aequriset to pact if 2 cligits ate _— ecco _ cthen go or right abinmert ie chivits will be pha Peet right side and s space will be panted-bind Llefr stole. Inclizetos 2 aligit dledimal, value sepusieol fe_peint, Lif 2 argits ye nod occur then Go_fer_left ctign mant ie di it will be phinbod = “the side QnA space voll be vn 2 When We are using (EBA ay prmat_s specifier then _ it Indicates 5 clivit clectonsl yo volue, with right [iinet tot manda eS en = higits ase nok eccur When teeau using “Y Bot 1 forenat specie fhen —— if torclracile & diast decimal valoe solth_tett — |B digits au net occust, thin fil om ee ee — [alignment but marchbry fo pelnk 9 cligits , Ate fi

You might also like