Computer Fundamentals e-Book fo"k; lwph INDEX bdkbZ 1 dEI;wVj (Computer Fundamentals) 1 dEI;wVj dk fodkl ,oa ihf<;k¡ 1&14 (Evolution and Generations of Computers) 2 3 4 dEI;wVj rU= (Computer System) dEI;wVj lkW¶Vos;j (Computer Software) la [ ;k flLVe] ckbujh xf.kro dEI; dEI;ww Vj V j dks M 15&36 37 & 49 50& 76 (Number System, Binary Arithmetic & Computer Codes) bdkbZ 2 izksxzkfeax esFksMksyksth (Programming Methodlogy) 1 izksxzkfeax esFksMksyksth (Programming Methodlogy) 77-85 bdkbZ 3 C++ 1 2 dk ifjp; (Introduction to C++) C++ Hkk"kk esa izksxzke cukuk (Programming in C++) vk¡ dMksa ds izdkj] pj] fLFkjkad 86-100 101-116 (Data Type, Variable, Constant) bdkbzZ 4 C++ 1 2 3 esa izksxzkfeax (Programming in C++) fu;=a.k dk izokg (Flow of Control) ;wtj fMQkbUM QaD’ku (User defined functions) ,js ,oe~ LVªdpj (Array and Structure) 117-126 127-137 138-172 dEI;wVj foKku /1 1 dEI;wVj dk fodkl ,oa ihf<;k¡ (Evolution and Generations of Computers) dEI;wVj dk fodkl (Evolution of Computers) foy{k.k {kerk rFkk Rofjr xfr okyk vk/kqfud dEI;wVj dksbZ ,slk vkfo"dkj ugha gS tks fdlh vdsys O;fDr ds efLr"d dh mit gksA vkËkqfud dEI;wVj dh ladYiuk dks lkdkj gksus esa gtkjksa o"kZ yxs gSaA ;g fiNys dbZ gtkj o"kksZa esa vusd O;fDr;ksa }kjk fd, x, vufxur vkfo"dkjksa] fopkjksa rFkk fodkl dk lefUor ifj.kke gSA yxHkx 3000 o"kZ bZlk iwoZ esa ehlksiksVkfe;k ds yksxksa us vutkus esa gh dEI;wVj ;qx dh uhao j[khA mUgksaus eudksa vkSj rkj ls fxurh fxuus dk lcls igyk midj.k cuk;kA yxHkx 600 o"kZ bZlk iwoZ esa phfu;ksa us bl midj.k esa dqN lq/kkj fd, ftlls bl midj.k }kjk x.kuk djuk vkSj vklku gks x;kA bl midj.k dks ,csdl (Abacus) dgk x;kA ml le; phu ds vykok tkiku esa Hkh bl midj.k dk mi;ksx gqvk djrk FkkA tkikuh bls lkjkscku (Saroban) dgrs FksA ;g tkuuk #fpdj gksxk fd cgqr ls phuh yksx vkt Hkh vius jkstkuk ds O;kikfjd vkSj ysu&nsu ds dkeksa esa ,csdl dk gh mi;ksx djrs gSaA 1991 esa phu esa ,csdl dh tkudkjh j[kus okyksa dh ,d izfr;ksfxrk gqbZ ftlesa 24 yk[k yksxksa us Hkkx fy;kA vusd phuh yksxksa dk dguk gS fd ,csdl dEI;wVj ls Hkh T;knk rst gSA gekjs ns'k esa Hkh izkFkfed fo|ky;ksa dh izkjfEHkd d{kk esa cPpksa dks vad xf.kr ds fl)kUr le>kus esa bldk mi;ksx fd;k tkrk gSA fp= 1-1 ,csdl dEI;wVj foKku /2 blds ckn tc Hkkjr esa 'kwU; dk vkfo"dkj gqvk rks izkjfEHkd dEI;wVj esa vkSj ifjorZu gksus yxsA le; chrrk jgk] fodkl pyrk jgkA 17oha 'krkCnh ds izkjEHk esa LdkVyS.M ds ,d xf.krK tkWu usfi;j (John Napier) dks yèkqx.kd (Logarithm) cukus dk fopkj vk;k vkSj mUgksua s gh ckn esa x.kuk djus okyh ,slh ;qfDr cukbZ ftlls cM+h&cM+h rFkk n'keyo okyh la[;kvksa dk xq.kk djuk cgqr vklku gks x;kA bl ;qfDr dks usfi;lZ cksUl (Napier's bones) dgk x;kA lu 1642 esa Ýkalhlh xf.krK Cyst ,ikLdy (Blaize Pascal) us ek= chl o"kZ dh mez esa fo'o dk igyk ;kfU=d dsydqysVj cuk;k tks n'keyo iz.kkyh dh tksM+&ckdh dj ldrk FkkA bls ikLdykbu (Pascaline) uke fn;k x;kA ;g vusd pØksa (Wheels), xjkfj;ksa (Gears) rFkk csyuksa (Cylinders) ls fufeZr fp= 1-2 usfi;lZ cksUl FkkA ;g midj.k mlh izdkj dk;Z djrk Fkk ftl izdkj orZeku okguksa esa fdyksehVj ekius ds fy, ekbyksehVj dke djrs gSaA rRi'pkr 1671 esa teZuh ds xkWVÝhM fycfut (Gotfried Leibniz) us ikLdykbu esa dqN ifjorZu fd;k ftlls bl dsydqysVj }kjk xq.kk ,oa Hkkx dj ikuk Hkh lEHko gks x;kA fp= fp= 1-3 Cyst ikLdy 1-4 ikLdykbu dsydqysVj dEI;wVj foKku /3 lu 1801 esa tSdkMZ (Jacuard) us diM+s cquus dh e'khu dk vkfo"dkj fd;k ftls ywe (Loom) dgk x;kA bl e'khu dh ;g fo'ks"krk Fkh fd blesa diM+s ds iSVuZ dks dkMZ&cksMZ ds fNnz ;qDr iap dkMksZa }kjk fu;fU=r fd;k tkrk FkkA bl fl)kUr dk mi;ksx ckn esa dEI;wVj esa lwpuk dks iapdkMZ ij laxzfgr djus esa fd;k tkus yxkA fp= 1-6 tSdkMZ fp= 1-5 tSdkMZ dh ywe fdUrq vk/kqfud dEI;wVj dh ladYiuk us 1821 esa vkdkj ysuk vkjEHk fd;kA ,d vaxzst oSKkfud pkYlZ cScst (Charles Babbage) us ,d ds ckn ,d rhu Lopkfyr ;kfU=d lax.kd (Automatic Mechanical Calculator) ds fuekZ.k dk iz;kl fd;kA bUgsa fMQjsal baftu (Difference Engine) uke fn;k x;kA igyk ;U= Lopkfyr dsydqysVj dk vkjfEHkd lEiw.kZ fMtkbu FkkA cSct s fujUrj 12 o"kksaZ rd bls cukus dk iz;kl djrs jgsA vHkh ;g vk/kk gh cuk Fkk fd mUgksaus viuk nwljk ;U= cukuk 'kq: dj fn;k tks igys ls gYdk rFkk rst pyus okyk FkkA fdUrq bldk fuekZ.k iwjk gksrk mlls igys mUgksaus blls Hkh csgrj viuk rhljk ;U= cukuk izkjEHk fd;kA iwjk ;g Hkh ugha gqvkA ;|fi] ckn esa 1843 esa igyk ;U= cuk vkSj LohMu esa iznf'kZr fd;k x;kA fp= 1-7 pkYlZ cScst dEI;wVj foKku /4 fp= 1-8 cSct s dk fMQjsal baftu blh Øe esa cSct s us 1833 esa ,d vkSj lax.ku ;U= dk fuekZ.k vkjEHk fd;k ftls oS'ysf"kd ;U= (Analytical Engine) dgk x;kA ,usyfs Vdy baftu dks lgh vFkksZ esa vkt ds vk/kqfud dEI;wVj dk iwot Z dgk tk ldrk gSA okLro esa cSct s ds ,usyfs Vdy baftu dk fof/kor fMtkbu dHkh cuk gh ugha] fdUrq cSct s us os ewyHkwr fl)kUr vo'; LFkkfir dj fn, ftu ij vkt ds dEI;wVj dke djrs gSAa pfdr djus okyh ckr ;g gS fd bldh vusd fo'ks"krk,a vkt ds bysDVªkfud dEI;wVj ds leku FkhaA blds fMtkbu esa vkt ds dEI;wVj tSls dsUnzh; izkl s slj] laxgz .k {ks=] eSeksjh vkSj buiqV&vkmViqV ;qfDr;ka vkfn lHkh dqN FkkA ;gka rd fd dkMZ iap djus dh i)fr Hkh cSct s us gh igyh ckj izLrqr dhA bu lc ;ksxnkuksa ds dkj.k gh pkYlZ cSct s dks dEI;wVj dk tud (Father of Computer) dgk tkrk gSA fp= 1-9 cScst dk ,usysfVdy baftu dEI;wVj foKku /5 lu 1887 esa vesfjdk ds geZu gkWysfjFk (Herman Hollerith) us lcls igyh fo|qr ;kfU=d dkMZ iap lkj.kh e'khu (Electro Mechanical Card Punch Tabulating Machine) cuk;hA bl e'khu esa cSVjh ls lapkfyr fLop vkSj fx;j Fks tks vR;f/kd vkokt fd;k djrs FksA gkWysfjFk dh bl e'khu esa iap dkMZ dk mi;ksx gksrk FkkA mUgksaus dksM fodflr fd, Fks ftUgsa gkWysfjFk dksM dgrs gSaA bu dksM ds }kjk iap dkMZ eas lwpuk dks laxzg djuk lEHko gks x;kA iap dkMZ dks VkbijkbVj tSlh e'khu ls iap fd;k tkrk FkkA iap dkMZ dEI;wVj esa lwpuk fuos'k (Input) dk lcls iqjkuk ekè;e gSA fp= 1-10 gkWysfjFk ,oa gkWyfjFk dh e'khu ekud iap dkMZ yxHkx 7-37 bap pkSM+k ,oa 3-25 bap yEck gksrk gSA bldh eksVkbZ 0-001 bap gksrh gSA blesa 80 v{kj (Character) fy[ks tk ldrs gSaA iap dkMZ esa tks fNnz gksrs gSa os 1 iznf'kZr djrs gSa o tgka fNnz ugha gksrs os 0 iznf'kZr djrs gSaA gkWysfjFk e'khu dk iz;ksx vesfjdk ds tu x.kuk foHkkx }kjk 1890 ds tux.kuk lEcU/kh vkadM+kas dks ladfyr djus ds fy, fd;k x;kA vkadM+s ladyu esa dqy rhu o"kksZa dk le; yxk] tcfd fcuk bl e'khu ds bls djus esa ,d n'kd yx tkrkA ;|fi bldh rqyuk esa] vk/kqfud dEI;wVj ;g dk;Z dsoy dqN ?kaVksa esa gh dj ldrs gaSA dEI;wVj foKku /6 fp= 1-11 gkWysfjFk dk iap dkMZ 1924 esa vesfjdk esa dEI;wVj cukus okyh igyh dEiuh bUVjus'kuy fctusl e'khu dkiksZjs'ku (International Bussines Machines Corporation-IBM) izkjEHk gqbZ] tks vkt Hkh nqfu;k dh lcls cM+h dEI;wVj fuekZrk dEiuh gSA 1943 esa vesfjdk ds gkoZMZ fo'ofo|ky; ds HkkSfrd foKkuh gkoMZ vkbdu (Howard Aiken) us vkbZ-ch-,e- ds lg;ksx ls ekdZ&I uked fo|qr&;kaf=d (Electro-Mechanical) dEI;wVj cuk;kA ;g dEI;wVj 51 QqV yEck vkSj 8 QqV Å¡pk FkkA blesa 0-75 fefy;u vo;o (Components) yxs Fks rFkk ,d gtkj fd-eh- ls vf/kd yEcs rkj dk mi;ksx fd;k x;k FkkA ;g ek= 5 lSd.M esa nks 10&vadh; la[;kvksa dks xq.kk dj ldrk Fkk tks ml le; ds fy, fjdkMZ FkkA blesa 23 vadksa okyh n'keyo iz.kkyh dh 72 la[;kvksa dks laxzg fd;k tk ldrk FkkA blesa iap dkMksZ ds LFkku ij iap isij Vsi dk mi;ksx fd;k x;k FkkA fp= 1-12 izFke fo|qr ;kaf=d dEI;wVj &ekdZ I dEI;wVj foKku /7 bysDVªkfud dEI;wVj (Electronic Computer) vc rd fodflr dEI;wVj fo|qr&;kfU=d FksA buesa dbZ xEHkhj dfe;ka FkhaA ,d rks budh dk;Z xfr /kheh Fkh nwljs ;kfU=d dyiqtksZa ds dkj.k buesa lwpukvksa dk lapkj fo'oluh; ugha gksrk FkkA buds vykok dksbZ Hkh fo'ks"k vfHkdyu djus ls iwoZ dEI;wVj dks ml dk;Z ls lEcfU/kr funsZ'k nsus ds fy, cgqr lkjs fLopksa vkSj ;kaf=d fx;jksa dks gkFk ls lek;ksftr djuk iM+rk FkkA QyLo:i dEI;wVj dh vis{kk vkijsVj dks dgha vf/kd dke djuk iM+rk FkkA vr% vc oSKkfudksa dk lkjk / ;ku ,d bysDVªkfud dEI;wVj fodflr djus ij dsfUnzr gks x;k tks T;knk rst gksus ds lkFk&lkFk vf/kd fo'oluh; Hkh gks vkSj mlls dke djus esa vf/kd Je Hkh u djuk iM+sA bysDVªkfud dEI;wVj esa xfr'khyrk ek= bysDVªkUl dh gksrh gSA bysDVªkUl dk lapj.k vR;f/kd fo'oluh; ,oa rhoz xfr ls gksrk gS ftlls dEI;wVj dh xfr c<+us ds lkFk&lkFk mldh fo'oluh;rk Hkh c<+ tkrh gSA bysDVªkfud dEI;wVj ij dk;Z djuk Hkh vklku gksrk gSA fiNys lkB o"kksZa esa bysDVªkfud dEI;wVj dh ubZ&ubZ rduhdh dk fodkl cM+h rsth ls gqvk gSA budk fodkl bruh rsth ds lkFk gqvk gS fd ikap lky iqjkuk ekWMy ,sfrgkfld oLrq cu dj jg x;k gSA dEI;wVj dh ihf<;k¡ (Generations of Computers) vkt ls yxHkx 60 o"kZ iwoZ dEI;wVj us okf.kfT;d {ks= esa izos'k fd;kA blls iwoZ bldk mi;ksx foKku] bathfu;fjax vkSj lsuk rd gh lhfer FkkA okf.kfT;d dEI;wVj ds fodkl Øe dks dEI;wVj esa iz;qDr uohu rduhdksa ds vk/kkj ij ihf<+;ksa esa oxhZd`r fd;k x;k gSA bl fodkl Øe esa dEI;wVj dh dk;Z djus dh xfr] laxzg.k {kerk vkSj u;s vuqi; z ksx izksxzkeksa esa o`f) gqbZ gS tc fd blds vkdkj vkSj dher esa deh vkbZ gSA blds mRiknu esa Hkh rsth vkbZ gS vkSj vc ;g vklkuh ls miyC/k gSA dEI;wVj ds vc rd ds fodkl Øe dks ikap ihf<+;ksa (Generations) esa foHkDr fd;k x;k gSA ;|fi bu ihf<+;ksa esa FkksM+k cgqr vfrO;kiu (Overlapping) gS] fdUrq uhps ihf<+;ksa ds lkeus of.kZr dky vf/kdka'kr% Lohdkj fd;k x;k gSA izFke ih<+h (First Generation) 1942-1955 bl ih<+h ds dEI;wVjksa esa oSD;we V~;wc (Vacuum Tubes) dk mi;ksx gksrk FkkA oSD;we V~;wc vkdkj esa cM+h Fkh vr% bl ih<+h ds dEI;wVjksa dk vkdkj cgqr cM+k FkkA budh dk;Z djus dh xfr /kheh FkhA buesa buiqV rFkk vkmViqV ds fy, iap dkMksZa dk mi;ksx gksrk FkkA vkUrfjd eSeksjh ds fy, pqEcdh; Mªe (Magnetic Drum) iz;qDr gksrs FksA buesa e'khuh Hkk"kk rFkk vlsEcyh Hkk"kk izpfyr FkhA budk iz;ksx oSKkfud vuql/a kku rFkk okf.kfT;d dk;ksZa tSls osru fcy cukuk] fcy rS;kj djuk] ys[kkadu djuk vkfn rd lhfer FkkA bl ih<+h ds dqN ize[q k dEI;wVj fuEu Fks& bfu,d (ENIAC) 1943-1946 ;g izFke lkekU; mi;ksx okyk bysDVªkfud dEI;wVj (General Porpose Electronic Computer) Fkk ftls vesfjdk dh isUuflyokfu;k fo'ofo|ky; (University of Pennsylvania) ds dEI;wVj foKku /8 ts- izsLij ,dVZ (J. Presper Eckert) rFkk tkWu epyh (John Mauchly) us cuk;kA bldk iwjk uke Eletronic Numerical Integrator and Calculator FkkA ;g 50 QqV yEck rFkk 30 QqV pkSMk+ FkkA bldk otu 30 Vu Fkk vkSj blesa 18]000 oSD;we V~;wcksa dk mi;ksx gqvk FkkA bls lapkfyr djus ds fy, 1]50]000 okV fctyh dh vko';drk gksrh FkhA fp= 1-13 bfu,d ,Mosd (EDVAC) 1946-1952 Electronic Discrete Variable Automatic Computer (EDVAC) bfu,d ds lykgdkj gaxjh ds tkWu okWu U;wesu (John Von Neumann) dhs laxzfgr vuqns'k ladYiuk (Stored Program Concept) ds vk/kkj ij cuk;k x;kA blls iwoZ dEI;wVjksa esa izksxzke ,oa MkVk laxzg djuk cgqr eqf'dy dk;Z FkkA izFke ih<+h ds vU; egRoiw.kZ dEI;wVj EDSAC (1947-49), MANCHESTER MARKI (1948), UNIVAC (1951) vkfn FksA izFke ih<+h ds dEI;wVjksa esa dbZ dfe;ka FkhA ;s vkdkj esa cgqr cM+s FksA vf/kd rki ls izk;% budh V~;wc ty tk;k djrh FkhaA buds [kjkc gksus dh lEHkkouk vf/kd jgrh FkhA budk j[k&j[kko cgqr eagxk iM+rk FkkA fo|qr [kpZ cgqr vf/kd FkkA budh dk;Z djus dh xfr /kheh FkhA buds fy, okrkuq d q y u vko';d FkkA ia p dkMZ @ Vs i ds mi;ks x ds dkj.k bues a buiq V&vkmViq V dkQh /khek gksrk FkkA budh eq[; Le`fr (Main Memory) cgqr de FkhA izksxzkfeax {kerk Hkh cgqr de FkhA budk cgqr gh lhfer mi;ksx FkkA f}rh; ih<+h (Second Generation) 1955-1964 f}rh; ih<+h ds dEI;wVj VªkaftLVjksa ij vk/kkfjr FksA VªkaftLVj dk vkfo"dkj 1947 esa csy yscksjsVªht }kjk fd;k x;k FkkA VªkaftLVj ,d lkWfyM LVsV ;qfDr (Solid State Device) gS tks v)Z pkyd /kkrq ls cuk gksrk gSA VªkaftLVj dk ogh dk;Z Fkk tks izFke ih<+h ds dEI;wVjksa esa ^^oSD;we V~;cw ^^ dk FkkA fdUrq budk vkdkj oSD;we V~;wc dh rqyuk esa cgqr NksVk Fkk vkSj ;s vf/kd fo'oluh; rFkk vis{kkd`r vf/kd rhoz xfr ls dk;Z djus esa l{ke FksA buesa fo|qr dh [kir Hkh cgqr de gksrh FkhA dEI;wVj foKku /9 fp= 1-14 VªkaftLVj bl le; Le`fr (Memory) dh rduhd esa Hkh lq/kkj gq,A 1960 ds n'kd esa iw.kZr;k Vªkfa tLVj rduhd ij vk/kkfjr izkFkfed eSeksjh (Primary Memory) miyC/k gks xbZA f}rh;d eSeksjh (Secondary memory) ds fy, pqEcdh; Vsi vkSj fMLdksa dk iz;ksx izkjEHk gqvk tks vkt Hkh izpfyr gSA VªkaftLVj ds mi;ksx ls dEI;wVjksa dk vkdkj cgqr NksVk gks x;k] lkFk gh vf/kd rkieku dh leL;k Hkh cgqr gn rd de gks xbZA blh dkj.k budh fo'oluh;rk Hkh c<+h A NksVs vkdkj ds dkj.k vkUrfjd eSeksjh dks Hkh c<+k;k tk ldkA budh dk;Z xfr Hkh c<+h rFkk igys ls dgha vf/ kd vPNh buiqV&vkmViqV ;qfDr;ksa dk mi;ksx fd;k tkus yxkA dEI;wVjksa dhs ykxr ewY;ksa esa Hkh deh vkbZA bl ih<+h esa mPp Lrjh; izksxzkfeax Hkk"kkvksa dk fodkl gqvk] tSls& BASIC, COBOL, FORTRAN vkfnA bu mPp Lrjh; Hkk"kkvksa ds izknqHkkZo ls izksxzkfeax dk dk;Z vklku gks x;kA bl ih<+h ds dEI;wVjksa ds vuqiz;ksx {ks=ksa dk Hkh foLrkj gqvk] tSls ok;q;ku ds ;kf=;ksa ds fy, vkj{k.k] izca/ku lwpuk iz.kkyh] baftfu;fjax] oSKkfud vuqla/kku vkfn esa Hkh budk mi;ksx gksus yxkA IBM-70 lhjht] IBM-1400 lhjht] IBM-1600 lhjht] HONEYWELL-400 ls 800 lhjht] CDC-3600 vkfn bl ih<+h ds dqN ize[q k dEI;wVj FksA r`rh; ih<+h (Third Generation) 1964-1975 bl ih<+h ds dEI;wVjksa esa VªkaftLVjksa dk LFkku ,dhd`r ifjiFk (Integrated Circuts) us ys fy;kA bUgsa vkbZ-lh- (I.C.) dgk tkrk gSA vkbZ-lh- ,d NksVk lk] vk;rkdkj piVk VqdM+k gksrk gS ftlesa gtkjksa Vªkfa tLVj rFkk vU; bysDVªkfud rRo fufgr gksrs gaSA vius NksVs piVs vkdkj ds dkj.k ;s fpi ds uke ls vf/ kd yksdfiz; gSaA vkbZ-lh- ds mi;ksx ls dEI;wVjksa dk vkdkj vkSj NksVk gqvk] xfr rhoz gqbZ] eSeksjh c<+h rFkk ykxr esa deh vkbZA lkFk gh budh fo'oluh;rk Hkh vkSj vf/kd c<+hA fp= 1-15 ,dhd`r ifjiFk (I.C.) dEI;wVj foKku /10 bl le; dEI;wVjksa ds ekudhdj.k (Standardization) dh vko';drk vuqHko gqbZA blls iwoZ lHkh dEI;wVj fuekZrk vius fglkc ls lkW¶Vos;j dk fuekZ.k dj jgs Fks vkSj muesa vkil esa dksbZ rkyesy ugha FkkA QyLo:i rS;kj fd, tkus okys izkx s kz eksa dh ykxr T;knk iM+rh FkhA vr% lkW¶Vos;j fuekZ.k ds fy, ekud vk/kkj r; fd, x,A bl dky eas fodflr egRoiw.kZ dEI;wVj IBM-360, ICL-1900, IBM-370, VAX-750 vkfn FksA prqFkZ ih<+h (Fourth Generation) 1975 ls vc rd bl ih<+h ds dEI;wVjksa esa cM+s iSekus ds ,dhd`r ifjiFk (Very Large Scale Integrated Circuits - VLSI) iz;Dq r gq,A bu ifjiFkksa esa ,d bap ds pkSFkkbZ Hkkx esa yk[kksa Vªkfa tLVj vkSj vU; bysDVªkfud ?kVd lek, gksrs gSAa vr% bu ifjiFkksa dks ekbØksfpi dgk tkus yxkA igyk ekbØksfpi s j dgk tkus 1970 esa bUVsy dkWjiksj's ku us Intel 4004 rS;kj fd;kA bl NksVs ls fpi dks ekbØks izksll yxkA ekbØks izkl s l s j ;qDr dEI;wVj dks gh ekbØks dEI;wVj dgk tkrk gSA ekbØks izkl s l s j ds mi;ksx ls bl ih<+h ds dEI;wVjksa dk vkdkj vR;f/kd NksVk gks x;kA QyLo:i vc rd ftu dEI;wVjksa ds fy, cM+s&cM+s d{kksa dh vko';drk gksrh Fkh oks vc Vsfcy ij j[ks tkus yxs (Desktop Computer)A vki vius fo|ky; esa ftu dEI;wVjksa dk mi;ksx djrs gSa oks pkSFkh ih<+h ds gh dEI;wVj gaSA vkSj vc rks xksn esa j[k dj lapkfyr djus okys ySi VkWi (Lap Top) ,oa gFksyh esa j[kus okys ike VkWi (Palm Top) dEI;wVj Hkh vk x, gSaA fp= 1-16 MsLdVkWi dEI;wVj ekbØksikz l s l s j vk/kkfjr bl ih<+h ds dEI;wVjksa dh dk;Z djus dh xfr vdYiuh; <ax ls c<+h gSA budh {kerk] eSeksjh vkSj fo'oluh;rk esa Hkh vk'p;Ztud o`f) gqbZ gSA cgq vk;keh gksus ds dkj.k mi;qDr izksxzkfeax ds }kjk budk dk;Z {ks= vR;f/kd foLr`r gks x;k gSA ;s lgh vFkksZa esa iw.kZ tujy ijit dEI;wVj (Totally General Purpose Computer) gaSA thou dk 'kk;n gh ,slk dksbZ {ks= cpk gS tgka fd budk mi;ksx ugha gks jgk gksA vkt budh dher Hkh bruh de gks xbZ gS fd ,d lk/ dEI;wVj foKku /11 kkj.k O;fDr Hkh ,d ?kjsyw dEI;wVj dk [kpZ ogu dj ldrk gSA vkdkj ds vk/kkj ij bl ih<+h ds dEI;wVj ekbØks dEI;wVj ¼MsLdVkWi] ySi VkWi] ike VkWi½] feuh dEI;wVj] esu Ýse dEI;wVj rFkk lqij dEI;wVj esa oxhZd`r fd;s tkrs gaSA fp= 1-17 lqij dEI;wVj ekbØksizkl s slj ij vk/kkfjr igyk PC 1970 esa MITS uked dEiuh us cuk;kA bldk uke Altair Fkk tks Intel-8008 ekbØks izksll s j ij vkËkkfjr FkkA 1978 ls IBM dEI;wVjksa dh J`[a kyk izkjEHk gqbZ tks lcls lQy jghA bl J`a[kyk dk igyk yksdfiz; dEI;wVj ekbØks izkslslj 80186 ij vk/ kkfjr FkkA ckn esa 80286(1983), 80386(1986), 80486(1989), isfUV;e-I (1993)] isfUV;e-II (1997), isfUV;e-III (1999), isfUV;e-IV (2000) miyC/k gq,A buds vfrfjDr ,Iiy] dkWEiSd ,oa gSyosV iSdkMZ dEiuh ds dEI;wVj Hkh yksdfiz; gq, gSaA ikapoh ih<+h (Fifth Generation) ;s dEI;wVj vHkh fodkl dh voLFkk esa gSaA buesa rdZ djus] lkspus&le>us] fu.kZ; ysus vkfn ckSf)d {kerkvksa dk fodkl djus ds iz;kl fd, tk jgs gaSA ;s dEI;wVj orZeku ds dEI;wVjksa ls vf/ kd rhoz xfr okys] vf/kd fo'oluh; vkSj tfVy rFkk fo"ke ifjfLFkfr;ksa esa Hkh dk;Z dj ldus esa l{ke gksaxAs ikapoh ih<+h ds dEI;wVjksa esa izkx s zkfeax dh fof/k;ka Hkh ljy gks tk,axhA ;s ekuoh; Hkk"kk rFkk O;ogkj dks Hkh le>us yxasxs vr% buiqV vkSj dek.M (Command) nksauksa gh ds fy, vkSj vf/ kd vklkuh gks tk,xhA vkus okys le; esa eksckby dEI;wVjksa dk izpyu c<+sxk D;ksfd budk vkdkj fnu&izfrfnu NksVk gksrk tk jgk gSA dEI;wVj foKku /12 egRoiw.kZ fcUnq 1- vk/kqfud dEI;wVj dh ladYiuk dks lkdkj gksus esa gtkjksa o"kZ yxs gSaA ;g fiNys dbZ gtkj o"kksZa esa vusd O;fDr;ksa }kjk fd, x, vufxur vkfo"dkjksa] fopkjksa rFkk fodkl dk lefUor ifj.kke gSA 2- x.kuk ds fy, loZizFke mi;ksx esa vkus okyk midj.k ,csdl (Abacus) Fkk ftldk vfo"dkj phu esa gqvkA 3- 17oha 'krkCnh ds izkjEHk esa LdkVyS.M ds xf.krK tkWu usfi;j us yËkqx.kd (Logarithm) cuk;k rFkk ckn esa usfi;lZ cksUl uked x.kuk djus okyh ,d ,slh ;qfDr cukbZ tks cM+h&cM+h rFkk n'keyo okyh la[;kvksa dk vklkuh ls xq.kk dj ldrh FkhA 4- 1642 esa Cyst ikLdy us fo'o dk igyk ;kfU=d dsydqyVs j cuk;k tks n'keyo iz.kkyh dh tksM+ ckdh dj ldrk FkkA bls ikLdykbu uke fn;k x;kA 5- vk/kqfud dEI;wVj dh ladYiuk dks izfrikfnr djus okys pkYlZ cSct s FksA bUgs dEI;wVj ds tud (Father of Computer) dgk tkrk gSA 6- pkYlZ cSct s us 1821 eas fMQjsal baftu rFkk 1833 esa ,usyfs Vdy baftu cuk, ftUgsa vk/kqfud dEI;wVjksa ds iwoZt dgk tk ldrk gSA 7 - 1887 esa geZu gkWyfs jFk us fo|qr ;kfU=d dkMZ iap VscqysfVax e'khu cukbZ ftldk mi;ksx 1890 esa vesfjdk ds tu x.kuk foHkkx }kjk tux.kuk lEcUËkh vkadM+kas dks ladfyr djus ds fy, fd;k x;kA 8- 1943 esa vesfjdk ds gkoZMZ fo'ofo|ky; ds HkkSfrd foKkuh gkoMZ vkbdu us IBM ds lg;ksx ls Mark-I uke fo|qr ;kaf=dh dEI;wVj cuk;kA 9- bysDVªkfud dEI;wVjksa dk vkfo"dkj yxHkx lkB o"kZ iwoZ vkjEHk gqvkA bysDVªkfud dEI;wVjksa dk cM+h rsth ls fodkl gqvkA 10- bysDVªkfud dEI;wVj ds fodkl Øe dks ikap ihf<+;ksa (Generations) esa foHkDr fd;k x;k gSA vH;kl iz'u% cgq p ;ukRed iz ' u% 1- x.kuk djus dk lcls izkphu midj.k gS& ¼v½ y/kqx.kd ¼c½ usfi;lZ cksUl ¼l½ ,csdl ¼n½ ikLdykbu 2- loZizFke ;kfU=d x.kd Fkk& ¼v½ ikLdykbu ¼c½ ,csdl ¼l½ fMQjsal baftu ¼n½ ,usysfVdy baftu 3- dEI;wVj ds tud (Father of Computer) gS& ¼v½ tSdkMZ ¼c½ pkYlZ cSct s ¼l½ Cyst ikLdy ¼n½ geZu gkWysfjFk 4- vk/kqfud dEI;wVj dk iwoZt gS& dEI;wVj foKku /13 ¼v½ ,csdl ¼c½ ,usyfs Vdy baftu ¼l½ ikLdykbu ¼n½ dkMZ iap VscqysfVax e'khu 5- dEI;wVj ds fodkl Øe dks fdruh ihf<+;ksa esa ckaVk x;k gS& ¼v½ 3 ¼c½ 4 ¼l½ 5 ¼n½ 7 6- ,csdl dk tkikuh uke gS& ¼v½ lkjkscku ¼c½ ikLdykbu ¼l½ ywe ¼n½ ;wfuosd 7- VªkaftLVj dk mi;ksx dkSu&lh ih<+h ds dEI;wVjksa esa fd;k x;k& ¼v½ izFke ih<+h ¼c½ f}rh; ih<+h ¼l½ r`rh; ih<+h ¼n½ prqFkZ ih<+h 8- izFke ;kfU=d dsydqysVj fdl oSKkfud }kjk cuk;k x;k Fkk& ¼v½ tSdkMZ ¼c½ pkYlZ cSct s ¼l½ Cyst ikLdy ¼n½ geZu gkWysfjFk 9- izFke fo|qr ;kfU=dh; dEI;wVj Fkk& ¼c½ bfu,d ¼v½ ekdZ&I ¼l½ ,Mosd ¼n½ ;wfuosd 10- vki }kjk dEI;wVj iz;ksx'kkyk esa iz;Dq r fd;k tkus okyk dEI;wVj dkSu&lh ih<+h dk gS& ¼v½ f}rh; ih<+h dk ¼c½ r`rh; ih<+h dk ¼l½ prqFkZ ih<+h dk ¼n½ ikapoh ih<+h dk vfry?kq Ù kjkRed iz ' u% 1234567891011121314- ,csdl dk tkikuh uke crkb,A 1890 dh tux.kuk eas vesfjdk esa dkSu ls midj.k dk iz;ksx fd;k x;k Fkk\ gkoMZ vkbdu us vkbZ-ch-,e- ds lg;ksx ls dkSu lk dEI;wVj cuk;k\ gkWysfjFk ds dkMZ esa fNnz }kjk fdl vad dks iznf'kZr fd;k tkrk gS\ fdl buiqV midj.k esa tSdkMZ ywe dk iz;ksx fd;k tkrk gS\ izFke ih<+h ds dEI;wVjksa esa fdl Hkk"kk dk iz;ksx gksrk Fkk\ izFke tujy ijit dEI;wVj dk uke crkb,A f}rh; ih<+h ds dEI;wVjksa esa oSD;we V~;wc ds LFkku ij fdl bysDVªkfud iqtZs dk mi;ksx fd;k x;k\ f}rh; ih<+h ds dEI;wVjksa esa iz;qDr gksus okyh fdlh ,d Hkk"kk dk uke crkb,A lcls igyk ekbØks izkslslj ;qDr dEI;wVj dkSu lk Fkk\ dkSu&lh ih<+h ds dEI;wVjksa dks iw.kZ tujy ijit dEI;wVj dgk x;k\ ekbØks izkslslj vk/kkfjr izFke dEI;wVj dk uke crkb,A e'khuh Hkk"kk dk iz;ksx dkSu&lh ih<+h ds dEI;wVjksa esa gqvk\ r`rh; ih<+h ds fdlh ,d ize[q k dEI;wVj dk uke crkb,A dEI;wVj foKku /14 15- y?kqx.kd (Logarithm) dk vkfo"dkj fdlus fd;k Fkk\ y?kq Ù kjkRed iz ' u% 1- vk/kqfud dEI;wVj dk tud fdls rFkk D;ksa dgk tkrk gS\ 2- ,csdl D;k gS\ 3- fuEu dk iwjk vFkZ fyf[k,& IBM, ENIAC, EDVAC, IC, VLSI 4- ikapoh ih<+h ds dEI;wVjksa dh fo'ks"krk,a crkb,A 5- fMQjsal baftu rFkk ,usysfVdy baftu dh fo'ks"krk,a crkb,A fucU/kkRed iz ' u% 1- dEI;wVj ihf<+;ksa ls D;k rkRi;Z gS\ vc rd dEI;wVjksa dh fdruh ihf<;k¡ gS] izR;sd ih<+h dh ikap&ikap fo'ks"krk,a crkb,A 2- vkbZ-lh- rduhd dh fo'ks"krk,a crkb,A vkbZ-lh rduhd us dEI;wVj dk vkdkj ?kVkus esa fdl izdkj lg;ksx fd;k gS\ 3- ;kfU=d dEI;wVjksa ds nks"k crkb,A bysDVªkfud dEI;wVj ls ;s nks"k dSls nwj gq,\ 4- oSD;we V~;wc dh rqyuk esa VªkaftLVj ds ykHk crkb,A 5- izR;sd dEI;wVj ih<+h dh fo'ks"krk,a crkrs gq, bysDVªkfud dEI;wVj dk fodkl Øe crkb,A mÙkjekyk % 1- ¼l½ 2- ¼v½ 3- ¼c½ 4- ¼c½ 5- ¼l½ 6- ¼v½ 7- ¼c½ 8- ¼l½ 9- ¼v½ 10- ¼l½ dEI;wVj foKku /15 2 dEI;wVj rU= (Computer System) 2-1 izLrkouk (Introduction) fdlh ,d ;k ,d ls vf/kd y{;ksa dks izkIr djus ds fy, dk;Zjr bdkb;ksa ds lewg dks rU= (System) dgrs gSaA mnkgj.k ds :i esa fo|ky; ,d rU= gS] ftldh bdkb;k¡ gS& a fo|kFkhZ] f'k{kd] iz/kkukpk;Z] d{kk&d{k] iqLrdky;] iz;ksx'kkyk vkfnA bldk y{; gS f'k{kk iznku djukA blh izdkj dEI;wVj Hkh ,d rU= (System) ds :i esa dk;Z djrk gSA dEI;wVj rU= (Computer System) ls vfHkizk; dEI;wVj ds HkkSfrd Hkkxksa (Physical Units) ls gSA 2-2 dEI;wVj rU= dh bdkb;k¡ (Units of Computer System) dEI;wVj rU= eq[;r% rhu bdkb;ksa ls feydj cuk gksrk gSA 1- flLVe ;wfuV (System Unit)] 2- buiqV ;wfuV (Input Unit) 3- vkmViqV ;wfuV (Output Unit) 1- flLVe ;wfuV (System Unit) %& ;g dEI;wVj dk eq[; Hkkx gS] ftlesa dsUnzh; lalk/ku bdkbZ (Central Processing Unit) vFkok lh-ih-;w- gksrk gSA flLVe ;wfuV ,d ckWDl gksrk gS] ftlesa lh-ih-;w- ds vykok dEI;wVj dh dbZ vU; ;qfDr;k¡ (devices) rFkk ifjiFk (Circuit) yxs gksrs gSa] tks ,d eq[; ifjiFk cksMZ ;k enj cksMZ (Mother Board) ij la;ksftr jgrs gSA bl izdkj dEI;wVj dk vf/kdrj ifjiFk flLVe ;wfuV esa gh gksrk gSA 2- buiqV ;wfuV (Input Unit) %& dEI;wVj ¼flLVe ;wfuV½ esa MkVk rFkk izksxzke fooj.kksa dh izfof"V ds fy, iz;qDr dh tkus okyh ;qfDr;k¡ (Devices) buiqV ;wfuV ¼vkxe bdkbZ½ dgykrh gSaA dh&cksMZ] ekml] ¶ykWih fMLd vkfn buiqV fMokbl ds dqN mnkgj.k gSaA budh vkxs foLr`r ppkZ dh tk,xhA 3- fuxZe bdkbZ (Output Unit) %& dEI;wVj ¼flLVe ;wfuV½ ls izkIr fu"d"kksaZ dks fy[kus rFkk mu fu"d"kksaZ dks ekuoh; Hkk"kk esa izLrqr djus okyh ;qfDr;k¡ vkmViqV ;wfuV ¼fuxZe bdkbZ½ dgykrh gSaA ekWuhVj] fizUVj vkfn dqN lkekU; fuxZe ;qfDr;k¡ (Output Devices) gSaA budh ppkZ Hkh vkxs dh tk,xhA dEI;wVj foKku /16 fp= 2-1 dEI;wVj dk CykWd js[kkfp= 2-3 dsUnzh; lalk/ku bdkbZ (Central Processing Unit) vFkok lh-ih;w- (C.P.U.) ;g dEI;wVj dk fnekx gksrk gSA ;g funsZ'kksa dk fØ;kUo;u (Execution) djus ds fy, mUgsa i<+rk gS] O;k[;k djrk gS] fu;U=.k (Control) djrk gS vkSj lax.kuk (Calculation) djrk gSA okLro esa ge dEI;wVj dks tks Hkh funsZ'k nsrs gSa oks igys lh-ih-;w- esa tkrs gSa vkSj lh-ih-;w- gekjs funsZ'kkuqlkj fu"d"kZ ekWuhVj ij fn[kkrk gSA ;g dguk xyr ugha gksxk fd dEI;wVj esa ;fn lh-ih-;w- ugha gS rks dEI;wVj dqN Hkh ugha dj ldrkA ftl rjg gekjk fnekx gekjs leLr 'kjhj ij fu;U=.k j[krk gS] Bhd mlh izdkj lh-ih;w- dEI;wVj ds 'ks"k lHkh Hkkxksa tSl& s eSeksjh] buiqV o vkmViqV fMokblst vkfn ds dk;ksZa ij fu;U=.k j[krk gS vkSj muls dk;Z djokrk gSA izkx s zke vkSj MkVk] blds fu;U=.k esa eSeksjh esa laxzfgr gksrs gSaA blh ds fu;U=.k esa vkmViqV ekWuhVj ds LØhu (Screen) ij fn[kkbZ nsrk gS vFkok fizUVj ds }kjk dkxt ij Nirk gSA lh-ih-;w- yk[kksa&djksMk+ sa x.kuk,¡ o fu.kZ; lSd.Mksa esa dj ldrk gSA lh-ih-;w- dks rhu Hkkxksa esa ck¡Vk tk ldrk gS %& 12-3. fu;U=.k bdkbZ (Control Unit) vFkok lh-;w- (C.U.) vadxf.krh; o ,-,y-;w- (A.L.U.) rkfdZd bdkbZ (Arithmetic Logic Unit) eSeksjh (Memory) vFkok laxzg.k bdkbZ (Storage Unit) vFkok dEI;wVj foKku /17 ekbØksdEI;wVj esa lh-ih-;w- (C.P.U.) ,d NksVk lk ekbØksizkl s slj gksrk gSA vU; cM+s dEI;wVjksa esa ,d ls vf/kd ekbØksikz slslj gks ldrs gSA ekbØksikz slslj ls gh dEI;wVj ds dbZ dk;Z lapkfyr gksrs gSAekbØksikz slslj dh vkUrfjd lajpuk esa fuEu eq[; Hkkx gksrs gS %& lh-;w- (C.U.), ,-,y-;w- (A.L.U.), jftLVj (Register)] vkUrfjd cl (Internal Bus)A ekbØksizksll s j ds vkfo"dkj ls igys dEI;wVj dk ifjiFk dbZ VªkaftLVjksa (Transistors) dks la;ksftr dj cuk;k tkrk FkkA dEI;wVj dks vf/kd n{k] dk;Z&dq'ky ,oa mi;ksxh cukus ds fy, blds izkslslj ds ifjiFk esa Vªkfa tLVjksa dh la[;k esa vR;f/kd o`f) gksrh xbZA blls VªkaftLVjksa dk ifjiFk tfVy gksrk x;k vkSj ifjiFk esa vf/kd rki mRiUu gksus ls buds [kjkc gksus dh leL;k mRiUu gksus yxhA vr% ,d ,sls iqtsZ dh vko';drk gqbZ ftlesa vusd Vªkfa tLVjksa ds rqY; ifjiFk gksA ,slk iqtkZ gh ekbØksizkslslj dgykrk gSA fp= 2-2 ekbØksizkslslj lcls igyk ekbØksikz slslj lu~ 1970 esa baVsy dkiksZj's ku (Intel Corporation) us Intel 4004 ds uke ls rS;kj fd;k] ftlesa yxHkx 2300 VªkaftLVjksa ds cjkcj {kerk FkhA ekbØksikz slslj yxHkx vk/ks bap dk flfydkWu /kkrq ls fufeZr vk;rkdkj VqdM+k gksrk gS] tks ,d [kksy esa NksV& s NksVs duSDVlZ (Connectors) ds lkFk O;ofLFkr jgrk gSA piVk gksus ds dkj.k bls fpi (Chip) Hkh dgrs gSaA baVsy 4004 fpi ds ckn ekbØksizkl s slj dh rduhd fujUrj fodflr gksrh xbZ vkSj budh {kerk o xfr c<+rh xbZA orZeku esa fofHkUu xfr ,oa x.ku {kerk okys ekbØksizkslslj miyC/k gSa] ftuesa bUVsy isfUV;e&4] ,-,e-Mh- (AMD), lkbfjDl vkfn ekbØksizkslsljksa ds uke mYys[kuh; gSA fu;U=.k bdkbZ (Control Unit) vFkok lh-;w-(C.U.) lh-ih-;w- esa dUVªksy ;wfuV dh cgqr vge~ Hkwfedk gSA uke ds vuq:i ;g dEI;wVj dh lwpukvksa ds vknku&iznku ij o dEI;wVj ds vU; midj.kksa ij iwjk fu;U=.k j[krh gSA dUVªky s ;wfuV ds izeq[k dk;Z fuEufyf[kr gSa %& 2-3-1 (I) ;g dEI;w V j dh leLr vkUrfjd fØ;kvks a dk la p kyu djrh gSA (II) ;g buiqV&vkmViqV fØvk;ksa dks fu;fU=r djrh gSA (III) ;g eSeksjh ls izksxkz e i<+rh gS] mudh O;k[;k djrh gS rFkk ,-,y-;w- o eSeksjh esa okafNr fØ;k lEiUu djus ds fy, rnkuqlkj funsZ'k nsrh gSA (IV) ;g ,-,y-;w- dks ;g crkrh gS fd MkVk eSeksjh esa dgk¡ fLFkr gS] D;k fØ;k djuh gS rFkk izfØ;k ds i'pkr fu"d"kZ@ifj.kke (Result) dgk¡ laxzfgr gksuk gSA ;s lHkh funsZ'k fo/kqr ladrs ksa ds :i esa flLVe cl (System Bus) dh fu;U=d cl (Control Bus) ds ek/;e ls dEI;wVj ds fofHkUu Hkkxks rd lapfjr gksrs gSaA ¼vusd rkjks dk lewg cl dgykrh gSA½ dEI;wVj foKku /18 2-3-2 vadxf.krh; rkfdZd bdkbZ (Arithmetic Logic Unit), ,-,y-;w- (A.L.U.) ;g ;wfuV vadxf.krh; fØ;k,¡ rFkk rkfdZd fØ;k,¡ (Logical Operations) djrh gSA vad xf.krh; fØ;kvksa esa tksM+] ckdh] xq.kk] Hkkx lfEefyr gSA ALU esa ,d ,slk bysDVªkWfud ifjiFk gksrk gS tks vad xf.krh; x.kuk,¡ djus esa l{ke gksrk gSA rkfdZd fØ;kvksa esa ,-,y-;w- nks la[;kvksa ;k MkVk dh rqyuk dj] fu.kZ; ysus dk dk;Z djrk gSA rqyuk ds ifj.kke gk¡ vFkok ugha esa gksrs gSa] ftlls fu.kZ; ysus esa lgk;rk feyrh gSA ,-,y-;w- dUVªksy ;wfuV ¼lh-;w-½ dh fuxjkuh esa dk;Z djrk gSA ;g eSeksjh ls MkVk izkIr djrk gS] ml ij x.kuk,¡ djrk gS vkSj ifj.kke iqu% eSeksjh dks gh ykSVk nsrk gSA ,-,y-;w- ds dk;Z djus dh xfr vfr rhoz gksrh gSA ;g yxHkx nl yk[k x.kuk,¡ izfr lSd.M dh xfr ls djrk gSA ,-,yw sVj (Accumulators) gksrs gSa tks x.kukvks ds nkSjku ;w- esa vusd jftLVj (Register) vkSj ,D;qey {kf.kd laxgz gsrq eSeksjh dk dk;Z djrs gSaA ,-,y-;w- esa MkVk izkslsl gksus ds ckn ifj.kke dks ;k rks izn'kZu ds fy, vkmViqV midj.kks esa Hkst fn;k tkrk gSa ;k mUgsa eSeksjh esa laxzfgr dj fy;k tkrk gSA 2-44 ekbØks i z k s l s l j (Microprocessors) 2nqfu;k dk lcls igyk ekbØksizkslslj Intel Corp. U.S.A. }kjk lu~ 1971 esa fodflr fd;k x;k FkkA ;g ,d 4 fcV ekbØksizkl s slj Fkk ftls 2250 VªkfUtLVjksa ds ifjiFk dks esVy vkWDlkbM flfydkWu (Metal Oxide Sillicon) fpi ij cukdj rS;kj fd;k x;k FkkA bldk vkdkj 117Þ×159Þ s slj Intel FkkA lu 1972 esa baVsy us igyk 8 bit ekbØks izkslslj Intel 8008 cuk;kA nksuksa ekbØksizkl 4004 o Intel 8008 PMOS rduhd ij vk/kkfjr FksA muds ckn 1973 esa ,d vkSj 'kfDr'kkyh rFkk rst 8&bit ekbØksizkslslj cuk;k x;k ftls Intel 8080 dgk tkrk gSA baVsy dEiuh ds vykok vkt nks vU; dEifu;k¡ Hkh ftuds uke AMD (Advanced Micro Devices) o Cyrix gS] ekbØks izkslslj mRiknu esa dk;Zjr gSA baVsy dEiuh ds vkt lokZf/kd izpyu esa tks ekbØks izkslslj gS og isfUV;e Js.kh ds gSaA isfUV;e&I, isfUVe&II, isfUV;e&III rFkk lcls vk/kqfud isfUV;e& IV vkfn dqN izkslslj gSa tks dEI;wVj ds enjcksMZ esa lokZf/kd iz;qDr fd;s tkrs gSaA buds MkVk izkslsflax dh xfr 100 Mhz ¼esxk gVZt½ ls ysdj 800 Mhz rd gSA AMD dEiuh us Hkh baVsy ds isfUV;e izkslsljksa dh izfrLi/kkZ esa viuk ekbØks izkslslj cktkj esa AMD-K5, AMD-K6 bR;kfn ekWMy cktkj esa miyC/k djk;sA bu izkslsljksa dh xfr baVsy ds ekbØks izkl s l s j dh rqyuk esa dqN de Fkh ijUrq dher essa Hkh ;s rqyukRed lLrs FksA blh izdkj Cyrix Js.kh ds ekbØksizkslslj Hkh ekbØks dEI;wVj esa bLrseky fd;s tkrs gSaA ;s vis{kkd`r Intel o AMD ls dkQh lLrs gksrs gSa rFkk budh izkslsflax dh xfr isfUV;e ds lerqY; gSA Cyrix 686 o Cyrix-m2 vkfn dqN yksdfiz; lk;jsDl izkl s slj gSaA 2-5 ?kM+h xfr (Clock Speed) CPU ds dk;Z djus dh xfr ekius dh ,d dlkSVh ?kM+h xfr gSA dEI;wVj dh MkVk izkslsl dEI;wVj foKku /19 djus dh xfr bruh rhoz gksrh gS fd mls fdlh Hkh lk/kkj.k ?kM+h ls ekiuk vlEHko gS vr% dEI;wVj esa bysDVªkfud ?kM+h yxkbZ tkrh gSA tks mlds dk;Z djus dh xfr dks ekirh gSA ;g ?kM+h lhih;w }kjk fdlh ,d dke dks djus esa yxk le; ekius dh ctk; ;g ekirh gS fd lhih;w ,d lSd.M esa fdrus dk;Z dj ldrk gSA bl xfr dks ekius dh bdkbZ esxk gVZt (Mhz) gSA eSxkgVZt ls gekjk rkRi;Z nl yk[k funsZ'k izfr lSd.M gSA vr% 800 Mhz xfr okyk lhih;w izfr lSd.M 80 djksM+ funsZ'k fØ;kfUor dj ldrk gSA blh izdkj Ghz ls rkRi;Z ;g gS fd lkS yk[k funsZ'k izfr lSd.MA lu 2000 esa ,sls izkslsljksa dk fuekZ.k gks pqdk gS ftudh xfr 1Ghz ¼fxxkgVZt½ esa gSA 2-6 16 fcV] 32 fcV] 64 fcV ds izkslslj (16 bit, 32 bit, 64 bit Processors) lcls igys ilZuy dEi;wVj esa ,sls jftLVj iz;ksx esa fy;s x;s Fks tks fd flQZ 2 ckbVl (bytes) ds FksA ijUrq vktdy tks dEI;wVlZ cktkj esa miyC/k gS muesa 32 bit, 64-bit ;k 128bit okys jftLVlZ gksrs gSaA jftLVj dk vkdkj tks fd 'kCn dk vkdkj (Word size) dgykrk gS] ds }kjk gh irk pyrk gS fd fdlh Hkh fn;s x;s le; esa dEI;wVj fdrus MkVk dks izkslsl dj ldrk gSA ftruk cM+k 'kCn dk vkdkj (Word Size) gksxk mruh gh tYnh dEI;wVj MkVk dks izkslsl dj ldrk gSA ;fn dEI;wVj dk izkslslj 16 bit dk gS rks ;g ekuk tk;s fd izkslslj esa iz;qDr gksus okys jftLVlZ Hkh 16 bit ds gh gksaxsA ;fn jftLVlZ 16 bit ds gSa rks fuf'pr :i ls ml jftLVj esa ,d lkFk 16 bit dk MkVk izkslsl fd;k tk ldrk gSA vFkkZr~ ;fn izkslslj 32 bit dk gS rks fuf'pr :i ls og izkslslj ,d lkFk fdlh Hkh fn;s x;s le; esa 32 bit dk MkVk izkslsl dj ldrk gSA eryc ;g gS fd tks MkVk 16 bit dk izkslslj ;fn 1 lSfd.M esa izkslsl djrk gS rks ogh MkVk 32 bit dk izkslslj vk/kk lSfd.M esa gh izkslsl dj nsxkA fp= 2-3 fofHkUu izdkj ds izkslsllZ s l s jA ilZyu vktdy cktkj esa gj rjg ds izkl s l s j miyC/k gSa tSls 16 bit, 32 bit, 64 bit ds izkl dEI;wVj esa 16 bit ;k 32 bit ds izksll s j bLrseky gksrs gSa tcfd loZj Js.kh ds feuh dEI;wVj esa 64 bit ;k 128 bit ds izksll s j bLrseky gksrs gSaA izksll s j dk vkdkj dEI;wVj dh LihM dks izHkkfor djus okyksa dkj.kksa esa ls ,d gSA dEI;wVj foKku /20 2-7 Ákslslj ds Ádkj (Types of Processors) fofHkUu rduhd ls fofHkUu izdkj ds izkl s l s j dk fuekZ.k fd;k tkrk gSA izkl s l s j dks fufeZr djus okyh dEifu;k¡ Hkh dbZ gSa tSls Intel baVsy] eksVksjksyk (Motorola), AMD (Advanced Micro Devices) ,-,e-Mh- o Cyrix bR;kfn tks fd fofHkUu rduhd (Technology) ds vk/kkj ij fHkUu&fHkUu izkslslj dk fuekZ.k djrh gSaA buesa nks rduhdks ls cuk, izkl s slj fuEu gSAa 2-7-1 lh- vkbZ- ,l- lh- izkslsllZ (CISC Processors) eksVksjksyk (Motorola) dEiuh ds 680X0 o baVsy dEiuh ds 80x86 Js.kh ds izkslslj CISC izkslslj (Complex Instruction Set Computing) dkEiysDl bUlVªD'ku lsV dEI;wfVax) gh gSA bu lh-ih-;w- dk funsZ'k lewg yxHkx 200 ls 300 funsZ'kksa dk gksrk gSA ekbØksizksll s j fMtkbu esa ;g ekuk tkrk gS fd ;fn funsZ'kksa dk lewg NksVk gS rks izR;sd funs'Z k de le; esa izkslsl gks ldrk gSA vkSj izkslslj fdlh fn;s x;s le; esa T;knk funsZ'k izkslsl dj ldrk gSA 2-7-2 vkj- vkbZ- ,l- lh- izkslslj (RISC Processors) tks izkl s l s j fdlh fn;s x;s le; es]a funsZ'kksa dk lewg NksVk o ljy gksus ds dkj.k T;knk funs'Z k izkslsl dj ldrk gSA mls bl fl)kar ds dkj.k (Reduced Instruction Set Computing) izkl s slj dgk tkrk gSA RISC izkslslj esa funsZ'kksa dk lewg CISC izkslslj dh rqyuk esa dkQh NksVk o ljy gksrk gSA 1980 esa Power PC esa bl rjg ds izkslslj bLrseky fd;s x;s Fks tks fd vis{kkd`r dkQh rst o de [kphZys FksA e/;e vkdkj ds IBM ds dEI;wVlZ tSls RS/6000 o Unix ds odZ LVs'kuksa esa bl izdkj ds RISC izkslslj dk bLrseky fd;k x;k FkkA eksVksjksyk (Motorola) dEiuh Hkh nksuksa izdkj ds izkslslj cukrh gSA ;g rks Hkfo"; gh crk;sxk fd CISC ;k RISC rduhd ls cus izkslslj esa ls dkSulh rduhd ds izkl s slj T;knk yksdfiz; gksaxs] ijUrq ;g rks r; gS fd tks lcls de fo|qr dk mi;ksx djsxk ogh rduhd T;knk fodflr dh tk;sxhA 2-8 lh-ih-;w- dS'k (C.P.U. Cache) lh-ih-;w- ds }kjk tc MkVk ;k vuqns'kksa dks izkl s sl fd;k tkrk gS rc MkVk ;k vuqns'kksa dks dEI;wVj dh jSe (RAM) eSeksjh ls lh-ih-;w- ds jftLVj esa LFkkukafUrjr fd;k tkrk gS] ftlesa le; dh cckZnh gksrh gSA blds vykok jSe lh-ih-;w- dh rqyuk esa dkQh /khes dk;Z djrh gSA bldk ,d ek= mik; ;g gS fd lh-ih-;w- dh fpi ij gh ,d vfrfjDr eSeksjh yxk nh tkrh gSA bls lh-ih-;wdh dS'k (Cache) eSeksjh dgk tkrk gSA ;g lkekU; jSe (RAM) dh rjg gh gksrh gS ijUrq ;g lkekU; RAM jSe ls dkQh rst dk;Z djrh gSA bls fHkUu izdkj ls dk;Z esa fy;k tkrk gSA tc Hkh lh-ih-;w- dks MkVk ;k vuqn's k jSe ls i<+us (Read) gksrs gSa rc lh-ih-;w- lcls igys ;g ns[krk gS fd dgha oks MkVk ;k vuqn's k dS'k eSeksjh esa rks ugha gS] ;fn ugha gSa rks lh-ih-;w- MkVk ;k vuqn's k dks jSe ls jftLVj esa LFkkukfUrjr djrk gS vkSj lkFk gh bldh ,d dkWih (Copy) dS'k esa yksM (Load) dj nsrk gSA tc lh-ih-;w- dS'k eSeksjh ls gh MkVk ;k vuqns'k dks ysrk gS rks bl izdkj le; dh cpr gks tkrh gSA 2-9 dEI;wVj Le`fr ds izdkj (Types of Memory) dEI;wVj dh Le`fr mlds }kjk MkVk ds Hk.Mkj.k dh {kerk dks dgrs gSa] pwafd Le`fr Hk.Mkj.k dEI;wVj foKku /21 dh {kerk gksrh gS vr% mldks ukius ds fy;s fuEufyf[kr bdkb;ksa dk iz;ksx fd;k tkrk gSA Bit (Binary Digit), Byte, KiloByte, Mega Byte, Gega Byte, Tera Byte,Penta Byte Bit vFkkZr~ Binary digit, 0 ;k 1 esa ls fdlh ,d vad ds fy;s bLrseky fd;k tkrk gSA bldh vU; bdkb;ksa esa ijLij fuEufyf[kr lEcU/k gSA 8 bits 1024 bytes 1024 KB 1024 MB 1024 GB 1024 TB = 1 Byte = 1 KB = 1 MB = 1 GB = 1 TB = 1 PB (Kilo fdyks Byte) (Mega esxk Byte) (Gega xhxk Byte) (Tera Vsjk Bytes) (Penta isaVk Bytes) dEI;wVj esa nks izdkj dh Le`fr;k¡ ikbZ tkrh gSaA ftUgsa iz/kku (Main) rFkk f}rh;d (Secondary) Le`fr dgrs gSaA dEI;wVj Le`fr iz/kku (Main) Le`fr viz/kku (Auxiliary) Le`fr ;k vkUrfjd (Internal) Le`fr ;k cká (External) Le`fr ;k ;k f}rh;d (Secondary) Le`fr izkFkfed (Binary) Le`fr 2-9-1 iz/kku Le`fr ds izdkj (Types of Main Memory) dEI;wVj esa iz/kku Le`fr] bUVhxzsVsM lfdZV (Integrated Cricuit or IC) ds :i esa mifLFkr gksrh gSaA dEI;wVj esa nks izdkj dh iz/kku Le`fr ikbZ tkrh gS jSe (RAM- Random Access Memory) o jkse (ROM- Read Only Memory) bu nksuksa Le`fr;ksa esa fuEufyf[kr vUrj gksrk gSA RAM 1- bldk iwjk uke Random Access Memory gSA 2- blesa lwpukvksa dks fy[kk (Write) o i<+k (Read) tk ldrk gSA 3- ;g vLFkkbZ (Temporary) gksrh gSA 4- ;g oksysVkby (Volatile) gksrh gS vFkkZr blesa lwpuk,a rc rd lafpr jgrh gSa tc rd fd dEI;wVj vku (On) gSA 5- ;s dbZ izdkj dh gksrh gS tSls MhjSe (DRAM)] ,lMhjSe (SDRAM)]vkjMhjSe (RDRAM) MhMhjSe (DDRAM) ROM 1- bldk iwjk uke Read Only Memory gSA 2- blesa lwpukvks d a ks flQZ i<+k gh (Read Only) tk ldrk gSA 3- ;g LFkkbZ (Permanent) gks r h gS A 4- ;g ukWu&oksysVkby (Non-Volatile) gSA vFkkZr blesa lwpuk,a rc Hkh jgrh gSa tcfd dEI;wVj vkWQ (off) gSA 5- ;g nks izdkj dh gksrh gS&izkse (PROM) o bZizkse (EPROM) dEI;wVj foKku /22 (i) MhjSe (DRAM) MhjSe ls rkRi;Z Mk;ufed jSe (Dynamic RAM) ls gSA ;g jSe (RAM) dh ,d fHkUu izdkj dh eSeksjh gSA ;g MkVk dks rc rd vius ikl j[krh gS tc rd fjÝs'k ifjiFk (Refresh Circuit) ds }kjk MkVk yxkrkj ,Dlsl gksrk jgrk gSA fjÝsf'kax fØ;k ds dkj.k bls Mk;ufed jSe dgrs gSaA ;s vis{kkd`r lLrh o de txg esa cukbZ tkrh gSA bldks cukus esa ,d VªkaftLVj o ,d dSisflVj (Capacitor) dk iz;ksx gksrk gSA tc dSifs lVj vkosf'kr gksrk gS rks fo|qr vkos'k gksus ds dkj.k 1&fcV dks n'kkZrk gS vU;Fkk vkos'k u gksus ij 0&fcV dks n'kkZrk gSA fp= 2-4 jSe eSeksjh (ii) ,lMh jSe (SDRAM) vkerkSj ij dEI;wVj esa iz;qDr eSeksjh dks lk/kkj.kr% nks Hkkxksa esa ck¡Vk tk ldrk gSA LVSfVd jSe (Static RAM) rFkk Mk;usfed jSe (Dynamic-RAM) LVSfVd jSe oksyVs kby eSeksjh gksrh gSA blesa MkVk rc rd lafpr jgrk gS tc rd fd ;k rks ge dEI;wVj dks can ugha dj nsrs ;k ,d fuf'pr le;kof/k ds ckn Lor% gh fMfyV gks tkrk gSA blesa dqN (Refresh Circuit) fjÝS'k lfdZV gksrs gSa tks bls [kkyh djus dk dk;Z djrs gSaA ;g DRAM ls vf/kd vPNh gksrh gSA (iii) vkj- Mh- jSe (RDRAM) bl eSeksjh dk ,Dlsl le; 60 uSuks lSfd.M gksrk gSA ;g ,l-Mh- jSe ls Hkh rst gSA bl eSeksjh esa ls MkVk lh/ks gh fdlh Hkh ,Mªsl ls dkQh de le; esa i<+k tk ldrk gSA ;g yxkrkj fjÝS'k gksrh jgrh gSA ;g izR;sd lSfd.M esa vusdksa ckj pktZ gksrh jgrh gSA (iv) Mh- Mh- jSe (DDRAM) ;g ,d fo'ks"k izdkj dh eSeksjh gksrh gSA blesa MkVk fo|qr vkWQ (off) gksus ij Hkh lafpr jgrk gSA bls ge mu midj.kksa esa bLrseky djrs gSa ftuesa MkVk midj.k ds vkWQ djus ds ckn Hkh j[kuk gksrk gSA tSls] eksckby Qksu] fMthVy dSejk bR;kfnA (v) izkse (Prom) ;g jkse dk ,d izdkj gSA bls izksxkescy jhM vksuyh eSeksjh (Programmable Read Only Memory) dgrs gSaA bl eSeksjh esa izkx s zkej izkse&izksxzkej rduhd ls blesa igys ls lafpr izkx s zke dks ;k lwpukvksa dks cny ldrk gSA ysfdu ,d ckj lwpuk cnyus ij ;g jkse cu tkrk gSA ckn esa blesa dksbZ ifjorZu ugha fd;k tk ldrk gSA tcfd jkse eSeksjh esa fuekZrk ds }kjk lwpukvksa dk Hk.Mkj.k fd;k tkrk gS ftls izksxzkej cny ugha ldrk gSA (vi) bZizkse (EPROM) bldk iwjk uke bjslcy izksxkz escy jhM vkWuyh eSeksjh (Erasable Programmable Read Only s kz e dks u;s izkx s kz e Memory) gSA blesa lafpr lwpukvksa dks cnyk tk ldrk gS vkSj igys ls lafpr izkx ds }kjk cnyk tk ldrk gSA blesa lafpr lwpukvksa dh fpi dks lw;Z ds izdk'k esa ys tkus ls gVk;k dEI;wVj foKku /23 tk ldrk gSA vkSj tc bls i<+k tkrk gS rks ;g jkse dh rjg gh dk;Z djrk gSA blesa lafpr lwpuk,sa rc rd jg ldrh gS tc rd bUgsa gVk;k ugha tk;sA 2.10 L1, L2 dS'k ( L1, L2 Cache) eSeksjhA 1980 ls dS'k eSeksjh ilZuy dEI;wVj ds lh-ih-;w- ds lkFk gh cukbZ tkrh gSA tks dS'k eSeksjh lh-ih;w- esa gksrh gSA mls Level-1 (L 1) dS'k eSeksjh dgrs gSaA lcls igyk lh-ih-;w- dS'k ds lkFk 0-5KB dk cuk;k x;k FkkA ijUrq vktdy 8KB, 16KB, o 32KB dS'k eSeksjh ds lkFk lh-ih-;w- cktkj esa miyC/k gSA fp= 2-5 L1 o L2 dS'k eSeksjh lh-ih-;w- bdkbZ ds lkFk miyC/k dS'k eSeksjh ds vfrfjDr enjcksMZ ij Hkh vyx ls dS'k eSeksjh yxkbZ tkrh gSA bls Level-2 ( L2 Cache) dS'k eSeksjh dgrs gSaA vktdy cgqr ls ilZuy dEI;wVj esa 512KB ;k 1024KB dS'k eSeksjh enjcksMZ ij miyC/k djokbZ tkrh gSA mPp xfr okys dEI;wVj esa ;g 2MB rd Hkh gksrh gSA 2-11 ,Dlsl le; (Access Time) eSeksjh esa fdlh Hkh LFkku (Location) ls MkVk dks <w¡<us (Locate) o ml LFkku ls MkVk dkss i<+us (Retrieve) esa ftruk le; yxrk gS mls gh ,Dlsl le; (Access Time) dgrs gSaA ,slk djus ds fy;s lh-ih-;w- dks funsZ'k fn;k tkrk gS vkSj fQj lh-ih-;w- ds }kjk eSeksjh esa ls MkVk dks i<+k ;k fy[kk tkrk gSA blesa yxus okyk le; gh ,Dlsl le; dgykrk gSA ;g fdlh Hkh dEI;wVj ds fy;s vf/kdre xfr dk gksuk pkfg;sA 2- 12 f}rh;d Le`fr (Secondary Memory) dEI;wVj ds MkVk vkSj izksxkz e rkRdkfyd rFkk Hkfo"; ds mi;ksx gsrq laxfz gr djds j[ks tkrs gSaA ftu ek/;eksa esa bUgsa laxfz gr fd;k tkrk gS] mUgsa nks Hkkxksa esa foHkkftr fd;k tk ldrk gS& 1- izkFkfed laxzg.k ek/;e (Primary Storage Media) rFkk 2- f}rh;d laxzg.k (Secondary Storage Media) izkFkfed laxgz .k ek/;e esa MkVk vkSj izksxkz e dsoy rkRdkfyd :i ls laxfz gr fd, tk ldrs gSaA dEI;wVj dh eseksjh (Memory) izkFkfed laxzg.k ek/;e dk mnkgj.k gS] ftldk v/;;u ge iwoZ v/;k; esa dj pqds gSaA f}rh;d laxzg.k ek/;e ds vUrxZr os ;qfDr;ka lfEefyr dh tkrh gSa] ftuesa MkVk] izksxzke vkSj izfØ;k ifj.kkeksa dks rkRdkfyd rFkk Hkfo"; esa ckj&ckj mi;ksx gsrq LFkkbZ :i ls laxzfgr dj lqjf{kr j[ks tkrs gSaA ;gka ge ,slh gh dqN izeq[k ;qfDr;ksa ds ckjs esa v/;;u djsaxsA 2-12-1 pqEcdh; Vsi (Magnetic Tape) %& pqEcdh; Vsi ekW;yj (Mylar) IykfLVd dh cuh gksrh gS ftldh lrg ij vk;ju&vkWDlkbM (Iron-Oxide) dh pqEcdh; ijr dk ysiu p<+k gksrk gSA pqEcdh; Vsi 1/2 bap] 1/4 bap] 8mm, 3mm vkfn fofHkUu pkSMk+ bZ dh gksrh gSaA pqEcdh; Vsi dEI;wVj foKku /24 250MB, 500MB, 2GB, 10GB vkfn fofHkUu laxzg.k {kerkvksa esa miyC/k gSaA fp= 2-6 pqEcdh; Vsi ;wfuV fp= 2-7 pqEcdh; Vsi pqEcdh; Vsi dk mi;ksx izk;% cSdvi (Backup) MkVk ds :i esa fd;k tkrk gSA ;|fi orZeku esa cgqr vf/kd laxzg.k {kerk dh rduhdh dk fodkl gks pqdk gS] fdUrq pqEcdh; Vsi ds NksVs vkdkj rFkk de dher gksus dss dkj.k budk mi;ksx vkt Hkh MkVk laxzg.k gsrq fd;k tkrk gSA pqEcdh; Vsi ,slk MkVk] ftldk mi;ksx ckj&ckj ugha gksrk gS] ds laxzg.k gsrq vf/kd mi;qDr gksrh gSA pqEcdh; Vsi esa MkVk dks Øec) :i ls gh vfHkxe (Access) fd;k tk ldrk gS] blfy, bldk vfHkxe le; (Access Time) dkQh vf/kd gksrk gSA blh izdkj bl ij MkVk fy[kus esa Hkh vU; ;qfDr;ksa dh rqyuk esa vf/kd le; yxrk gSA 2-12-2 pqEcdh; fMLd (Magnetic Disk) %& pqEcdh; fMLd ,d mi;ksxh ,oa vR;f/kd izpfyr laxzg ;qfDr gSA blesa lh/kh vfHkxe (Direct Access) fof/k ls MkVk dks rhoz xfr ls izkIr ,oa laxzg fd;k tk ldrk gSA lh/kh vfHkxe fof/k esa fdlh vfHkys[k dks iwoZorhZ vfHkys[kksa dks i<+s fcuk] izkIr fd;k tk ldrk gSA pqEcdh; fMLd eq[; :i ls nks izdkj dh gksrh gSa& 1- gkMZ fMLd (Hard Disk) vkSj 2fMLdsV~l (Diskettes) gkMZ fMLd (Hard Disk) esa ,Y;wehfu;e ;k vU; /kkrq ls fufeZr pdfr;ka ;k IysVlZ (Platters) gksrh gaS ftudh nksuksa lrgsa pqEcdh; vk;ju vkWDlkbM ls ysfir jgrh gSaA gkMZ fMLd dh laxgz .k {kerk cgqr vf/kd gksrh gS rFkk blls MkVk izkIr djus dh xfr Hkh rhoz gksrh gSA gkMZ fMLd dk mi;ksx ekbØks dEI;wVj] feuh dEI;wVj vkSj esuÝse dEI;wVj rhuksa esa gh MkVk laxzg.k ds fy, fd;k tkrk gSA orZeku esa vusd izdkj dh gkMZ fMLd miyC/k gSaAsa fMLdsV~l (Diskettes) IykfLVd dh pdfr;ka (Disks) gksrh gSa tks IykfLVd ds [kksy esa lqjf{kr jgrh gSaA budh laxzg.k {kerk gkMZ fMLd dh rqyuk esa cgqr de gksrh gSA bUgsa lkekU;r% ¶ykWih fMLd (Floppy Disk) ds uke ls tkuk tkrk gSA ;s LFkkukUrj.kh; gksrh gSa rFkk dEI;wVj ls fudkydj ,d LFkku ls nwljs LFkku ij vklkuh ls yk;h o ys tk;h ldrh gSaA budk mi;ksx izk;% ekbØks dEI;wVjksa esa gksrk gSA 2-12-2.11 gkMZ fMLd (Hard Disk) %& gkMZ fMLd NksVs dEI;wVj tSls ekbØks dEI;wVj ,oa feuh 2-12-2 dEI;wVj esa MkVk laxgz .k ds fy, dke esa yh tkrh gSA ;g flLVe ;wfuV ds vUnj yxh gksrh gSA bldh vR;f/kd laxzg.k {kerk ds dkj.k bls ekl LVksjst fMokbl (Mass Storage Device) rFkk flLVe dEI;wVj foKku /25 ;wfuV ds vUnj yxh gksus ds dkj.k vkWu ykbu LVksjst fMokbl (Online Storage Device) Hkh dgrs gSaA orZeku esa 80GB, 160GB vkSj 240GB laxgz .k {kerk dh gkMZ fMLd vf/kd izpfyr gSA gkMZ fMLd ij cgqr&lh lwpuk,a LFkkbZ :i ls laxfz gr gksrh gSAa vkijsfVax flLVe] dEikbyj] ,lsEcyj] MkVkcsl] ,Iyhds'ku izksxzke vkfn Hkh gkMZ fMLd ij gh laxzfgr gksrs gSaA vr% gkMZ fMLd lokZf/kd izpfyr vko';d ,oa LFkkbZ laxzg.k ;qfDr gSA gkMZ fMLd esa ,Y;wehfu;e ;k vU; /kkrq ls fufeZr pdfr;ksa ;k fMLd IysVj (Disk Platters) dk lewg gksrk gSA izR;sd IysVj ij pqEcdh; vk;ju vkWDlkbM dk ysiu gksrk gSA IysVlZ dh nksuksa lrgksa ij ladUs nzh; VªSDl (Tracks) vkSj lSDVj (Sectors) gksrs gSaA MkVk bUgh VªSDl ,oa lSDVj esa laxfz gr jgrk gSA lHkh fMLd IysVj ,d fLi.My (Spindle) esa fijksbZ gksrh gSA izR;sd IysVj dk vyx ls jhM@jkbV gSM gksrk gSA lHkh jhM@jkbV gSMl ~ ,d gh Hkqtk ;k vkeZ (Arm) ij da/ksuqek lajpuk esa yxs jgrs gSaA bl Hkqtk dks ,Dlsl vkeZ (Access Arm) dgrs gSA izR;sd gSM ?kwerh gqbZ fMLd dh lrg ij mi;qDr VªSd ij igaqp tkrk gSA bl izdkj MkVk jhM@jkbV djus dh fØ;k lh/kh gksrh gSA izR;sd MkVk dh fLFkfr dk ,d irk ;k fMLd ,Mªsl (Disk Address) gksrk gS ftlesa lrg la[;k] VªSd la[;k vkSj lSDVj la[;k gksrh gSA blh dh lgk;rk ls ,Dlsl vkeZ MkVk dks [kkstrk gSA fp= 2-8 gkMZ fMLd fp= 2-9 gkMZ fMLd dh vkUrfjd lajpuk ,oa dk;Zfof/k gkMZ fMLd ,oa jhM@jkbV gSM ;s lHkh ,d gok cUn pSEcj esa lhy gksrs gSa ftlls ogka rd /kwy ugha tk ikrh gSA ;g pSEcj ckgj ls ns[kus esa yap ckDl tSlk yxrk gSA 2-12-2 2-12-2.22 ¶ykWih fMLd (Floppy Disk) %& ¶ykWih fMLd ek;yj IykfLVd (Mylar Plastic) ls fufeZr ,d o`rkdkj pdrh gksrh gS] ftldh lrg ij vk;ju vkWDlkbM ¼pqEcdh; inkFkZ½ dk ysiu gksrk gSA bldh nksuksa lrgksa ij Hkh gkMZ fMLd ds leku ladUs nzh; VªDS l (Tracks) vkSj lSDVlZ (Sectors) gksrs gSA MkVk bUgha VªSDl vkSj lSDVlZ esa laxzfgr gksrk gSA ¶ykWih fMLd dh lqj{kk gsrq bls IykfLVd ds vkoj.k esa j[kk tkrk gS tks bls [kajksp vkfn ls cpkrk gSA blds vkoj.k esa ,d Hkkx [kqyk gksrk gS] ftlls jhM@jkbV gSM MkVk dks fMLd ij dEI;wVj foKku /26 laxfz gr ;k izkIr dj ldsA bl [kqys Hkkx dks ,Dlsl foUMks (Access Window) dgrs gSaA ¶ykWih fMLd vkSj mlds vkoj.k esa ,d fNnz gksrk gS ftls bUMsDl gksy (Index Hole) dgrss gSaA bUMsDl gksy tc Hkh QksVks lsUlj (Photo Sensor) ds uhps vkrk gS rks bldk vFkZ gksrk gS fd jhM@jkbV gSM vc orZeku VªSd ds izFke lsDVj ij fLFkr gks x;k gSA ¶ykWih ds ,d vksj dqN Hkkx dVk gqvk gkssrk gS] ftls jkbV izksVsDV ukWp (Write Protect Notch) dgrss gSAa bldk mi;ksx fMLd ij MkVk dks jkbV (Write) ;k laxg z .k ls cpkus esa fd;k tkrk gSA tc ;g ukWp [kqyk gksrk gS rks ge MkVk dks i<+ Hkh ldrs gSa vkSj fy[k Hkh ldrs gSa fdUrq tc bls fdlh fLVdj ;k Vsi ls cUn dj fn;k tkrk gS rks fMLd ij MkVk dks dsoy i<+k tk ldrk gS] fy[kk ugha tk ldrk gSA ¶ykWih fMLd izk;% nks vkdkjksa esa miyC/k gksrh gSa& 1- ekbØks ¶ykWih (Micro Floppy) rFkk 2- feuh ¶ykWih (Mini Floppy) ekbØks ¶ykWih dk O;kl 3-5 bap gksrk gSA ;g ¶ykWih IykfLVd ds dBksj vkoj.k esa cUn jgrh gSA blfy, vf/kd lqjf{kr gSA blesa 1.44MB MkVk laxzfgr fd;k tk ldrk gSA vktdy 2.8MB MkVk laxzg djus okyh 3-5 bap O;kl dh ¶ykWih Hkh vk x;h gSA feuh ¶ykWih dk O;kl 5-25 bap gksrk gSA ;g yphys vkoj.k esa vkrh gS] blfy, lqjf{kr ugha gSAbldh laxzg.k {kerk Hkh de gSA blesa dsoy 1-2 MB MkVk laxzfgr fd;k tk ldrk gSA vr% feuh ¶ykWih dk izpyu cgqr de gSA ¶ykWih ikuh] vf/kd rki ,oa pqEcdh; {ks= esa j[kus ls [kjkc gks tkrh gSA tksj ls iVdus] esXusfVd inkFkZ ds gkFk yxkus ls Hkh bldk MkVk [kjkc gks tkrk gSA vr% buds mi;ksx esa dkQh lko/kkuh cjrus dh vko’;drk jgrh gSA fp= 2-10 ¶ykWih fMLd Åijh lrg fp= 2-11 ¶ykWih fMLd fupyh 2 -12 12--3 lh-Mh- jkse ;k dkWEiSDV fMLd (C.D. ROM or Compact Disk) lh-Mh- jkse ,d izdk’kh; (Optical) laxgz .k ;qfDr (Storage Device) gS ftlesa laxfz gr MkVk dks dsoy i<+k tk ldrk gSA ROM 'kCn Read Only Memory dk laf{kIr :i gSA lh-Mh- jkse esa yslj (LASER) fdj.kksa dh lgk;rk ls MkVk dks jhM (Read) vkSj jkbV (Write) fd;k tkrk gSA ;g fMLd jsftu (Resin) tSls inkFkZ ikWyhdkcksZusV ls cuh gksrh gSA bldh lrg ij ,Y;wehfu;e ;kSfxdksa dk ysiu gksrk gS ftlls blesa izdk'k dks ijkofrZr (Reflect) djus dk xq.k vk tkrk gSA MkVk laxzg.k dEI;wVj foKku /27 dh izfØ;k esa lh-Mh- jkse dh ijkorZd lrg ij mPp rhozrk ¼25 esxkokV½ okyh yslj fdj.k Mkyh tkrh gS ftlls ogka ,d vfr lw{e xM~<k ;k fiV (Pit) cu tkrk gSA ;g fiV ^1 fcV* dk lwpd gSA lrg ij tgka fiV ugha gS] og ^0 fcV* dk lwpd gSA ,sls fiV jfgr LFky dks ys.M (Land) dgrs gSaA fp= 2-12 lh-Mh- fp= 2-13 lh-Mh- jkse Mªkbo lh-Mh- jkse esa MkVk dks fMLd ls i<+us ds fy, de rhozrk ¼5 esxkokV½ okyh yslj fdj.ksa Mkyh tkrh gSaA ijkofrZr yslj fdj.kksa dks QksVks fMVsDVj (Photodetector) }kjk tkapk tkrk gSA ys.M ls ijkofrZr fdj.k dh rhozrk esa dksbZ vUrj ugha vkrk fdUrq fiV ls ijkofrZr fdj.k vusd fn'kkvksa esa QSy tkrh gS ftlls fiV dh mifLFkfr dk irk py tkrk gSA ijkofrZr izdk'k ds bl vUrj dks fo/kqr ladrs ksa ¼0 vkSj 1 fcV½ esa ifjofrZr dj fy;k tkrk gS ftlls MkVk dh tkudkjh gks tkrh gSA lh-Mh- jkse esa Hkh MkVk laxzg.k ds fy, VªSDl dk mi;ksx fd;k tkrk gSA ;s VªSDl lsDVj (Sector) esa caVs jgrs gSaA fdUrq CD-ROM ds VªSDl ¶ykWih fMLd ;k gkMZ fMLd dh rjg cUn u gksdj fujUrjrk fy, gksrs gSa ftudh yEckbZ yxHkx iakp fdyksehVj gksrh gSA ;s lfiZykdkj :i esa O;ofLFkr gksrs gSaA lh-Mh- jkse dh laxzg.k {kerk vf/kd gksrh gSA ,d lh-Mh- jkse esa 650MB rd MkVk laxzfgr fd;k tk ldrk gSA bldh MkVk LFkkukUrj.k nj Hkh vf/kd gksrh gSA lh-Mh- jkse dk mi;ksx eYVhfefM;k] dEI;wVj xsEl vkfn esa fd;k tkrk gSA vktdy lh-Mh- jkse dk mi;ksx fofHkUu 'kS{kf.kd tkudkfj;ka] fp= vkfn ds laxzg.k gsrq Hkh cgqr vf/kd gks jgk gSA 2-12 12--4 fMftVy ohfM;ks fMLd (Digital Video Disk ) fMftVy ohfM;ks fMLd (DVD) ns[kus esa fcYdqy lh-Mh- tSlh gh yxrh gS ysfdu nksuksa esa dbZ fHkUurk,a gSaA DVD esa CD dh vis{kk 7-5 xquk vf/kd MkVk laxzfgr fd;k tk ldrk gSA ,d lk/kkj.k DVD dh laxzg.k {kerk yxHkx 4.7GB gksrh gSA dqN DVD esa rks 17GB rd MkVk laxzg fd;k tk ldrk gSA DVD dk O;kl 4.7 bap gksrk gSA CD dh rjg DVD ij Hkh MkVk VSªDl ds :i esa laxfz gr fd;k tkrk gS tks dbZ lSDVjksa esa caVs gksrs gaSA fdUrq DVD esa CD dh rqyuk esa fiV~l (Pits) dk vkdkj cgqr vf/kd lw{e rFkk VSªDl ds e/ ; dh nwjh Hkh cgqr de gksrh gSA QyLo:i DVD dh {kerk CD dh rqyuk esa cgqr vfèkd c<+ tkrh gSA DVD dh ,d vkSj fo'ks"krk ;g gS fd ;g jhM ys;j ds Qksdl dks cny dj ,d ls vf/kd rF;ksa dks jhM dj ldrk gSA DVD esa MkVk nks irksZ esa fy[kk tkrk gS blls bldh laxgz .k {kerk esa vkSj o`f) gqbZ gSA bldh mez Hkh CD dh Hkk¡fr de ls de nl o"kZ gSA DVD jhM ,oa jkbV djus ds fy, MhohMh Mªkbo (DVD Drive) dh vko';drk gksrh gSA MhohMh Mªkbo lhMh dks Hkh jhM ,oa jkbV dj dEI;wVj foKku /28 ldrh gSaA ueh] rkieku tSls i;kZoj.kh; dkjd CD dh rjg DVD dks Hkh izHkkfor ugha djrs gaS fdUrq bls [kajksp ls cpkuk vko';d gSA [kajksp ls DVD iw.kZr% csdkj gks ldrh gSA /kwy Hkh DVD dks jhM djus esa ck/kk mRiUu djrh gSA vr% bls ges'kk doj esa j[kuk pkfg,A fp= 2-14 MhohMh Mªk bo 2-12 12--5 fti Mªkbo (Zip Drive) fti Mªkbo] ¶ykWih fMLd ds i'pkr pqEcdh; ek/;e (Magnetic Media) dh nqfu;k dk nwljk vk'p;Z gSA lh-Mh- jkbVj ls iwoZ fti Mªkbo gh lcls vf/kd izpfyr cSdvi midj.k FkhA fti Mªkbo lh-Mh- jkbVj ls dkQh fdQk;rh gSA blesa MkVk laxzg.k ds fy, tks midj.k dke esa fy;k tkrk gS mls fti dkWfVZt (Zip Cartridge) dgrs gSAa fti dkWfVZt ykus ys tkus esa lqfo/kktud rFkk vf/kd fo'oluh; gSA fti dkWfVZt esa yxHkx 100 MB MkVk laxzfgr fd;k tk ldrk gSA bldk vkdkj 4 oxZ bap gksrk gS rFkk eksVkbZ ¶ykWih ls yxHkx nqxuh gksrh gSA blh vklkuh ls tsc esa j[kk tk ldrk gSA fti Mªkbo izk;% dEI;wVjksa esa ugha gksrs blfy, fti Mªkbo ds }kjk MkVk LFkkukUrj.k djrs le; fti Mªkbo ,oa Mªkboj dh Hkh lkFk esa vko';drk gksrh gSA fti Mªkbo dks bULVky djuk cgqr vklku gksrk gSA fti fMLd ¼dkWfVªt Z ½ dk pqEcdh; ysi ¶ykWih fMLd dh rqyuk esa dgha vf/kd csgrj ,oa mPp xq.koÙkk dk gksrk gSA blfy, fti Mªkbo ds jhM@jkbV gSM dk vkdkj fp= 2-15 fti Mªkbo ,oa fti dkWfVªZt dkQh NksVk gksrk gS ftlls bleas VSªDl dh la[;k dgha vf/kd gksrh gS rFkk izfr VSªd lSDVjksa dh la[;k Hkh T;knk gksrh gSA jhM@jkbV gSM ds nks vksj ia[k (Wings) yxs gksrs gSaA ;s ia[k gSM dh xfr dks fu;fU=r djrs gaAS fti fMLd esa MkVk ¶ykWih fMLd dh Hkk¡fr o`rkdkj VSªDl ij laxfz gr gksrk gS] fdUrq izfr VSªd lSDVjksa dh la[;k fHkUu&fHkUu gksrh gSA fti Mªkbo ds lkFk ,d leL;k ;g gS fd orZeku esa miyC/k vkWijsfVax flLVe fti Mªkbo dks liksVZ ugha djrs gaSA vr% vyx ls Mªkboj baLVky djuk iM+rk gSA 2-12 12--6 isu/ QyS'k Mªkbo / bUVsfytsUV fLVd (Pen/Flash Drive /Intelligent Stick) ;g MkVk LFkkukUrj.k ,oa laxzg.k ds fy, ,d vk'p;Z pfdr djus okyh fo'ks"krkvksa ;qDr dEI;wVj foKku /29 uohure ;qfDr gSA MkVk LFkkukUrj.k ,oa laxzg.k ds fy, vc rd izpfyr ;qfDr;ksa tSls ¶ykWih] fti fMLd] lhMh vkfn izR;sd ds lkFk viuh leL;k,a gS fo'ks"kdj fHkUu ifj/kh; midj.kksa ;qDr dEI;wVjksa esa budk mi;ksx ugha fd;k tk ldrkA tcfd bUVsfytsUV fLVd dk mi;ksx fdlh Hkh dEI;wVj ds lkFk fd;k tk ldrk gSA fp= 2-16 bUVsfytsUV fLVd bls dEI;wVj ds USB iksVZ esa yxk;k tkrk gS bldk vkdkj bruk NksVk gksrk gS fd bls tsc ,oa ilZ esa vklkuh esa j[kk tk ldrk gSA budk vkdkj fHkUu&fHkUu gksrk gS fdUrq lkekU;r% ;s 167 bap yEch] 0-7 bap pkSM+h vkSj 0-1 bap eksVh gksrh gaSA vktdy buls Hkh NksVh bUVsfytsUV fLVd miyC/k gaSA vkdkj es NksVh gksus ds lkFk&lkFk budh fo'oluh;rk] dk;Z{kerk] laxgz .k {kerk vkfn Hkh deky dh gksrh gSA budh laxzg.k {kerk fHkUu&fHkUu gksrh gSA lkekU;r% 1 GB, 2 GB, 4 GB ;k 8 GB {kerk dh fLVd miyC/k gSA 2 .12 12.77 Cyw&js&fMLd (Blue-Ray-Disc) 12 Cyw&js&fMLd] CD rFkk DVD dh Hkkafr ,d vkfIVdy fMLd ek/;e gS A bldh HkkSfrd foek,a ekud DVD rFkk CD ds leku gksrh gSA Cyw&js&fMLd dh laxgz .k {kerk 25 GB izfr flaxy ys;j rFkk 50 GB M~;y w ys;j gksrh gSA Cyw&js&fMLd dks i<+us ds fy, Cyw&ok;ksyVs ystj dk mi;ksx fd;k tkrk gSA blh dkj.k bldk uke Cyw&js&fMLd iM+k gSA bldk eq[; mi;ksx gkbZ MsfQus’ku ohfM;ks] Iys LVs’ku- 3 fofM;ks xse rFkk vU; MkVk dks laxfz gr djus ds fy, fd;k tkrk gSA 12 2.12 12.88 eSeksjh fLVd (Memory Stick) eSeksjh fLVd ,d gVk;h tk ldus okyh ¶yS’k eSeksjh gS A eSeksjh fLVd dk mi;ksx oguh; ;qfDr (Portable Device) tSls ysiVksi] fofM;ks dSejk] QksVksxzkfQd dSejk] eksckby esa laxgz .k ek/;e ds :i esa fd;k tkrk gSA izkajfEHkd eSeksjh fLVd dh laxgz .k {kerk 128 MB Fkh A vkt cktkj esa vf/kdre 32 GB laxzg.k {kerk dh eSeksjh fLVd miyC/k gSA 2- 13 fuos'kh fuxr iksVZ @ la;ksft= (Input Output Port/Connector) 2-13 13.11 lhfj;y iksVZ (Serial port) lhfj;y iksVZ (Serial port) Js.kh lapkj (Serial Communication) dk ,d HkkSfrd lEidZ (Physical Interface) gS] tks dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa ,d fcV lwpuk vUnj ;k ckgj Hkstrk gSA ilZuy dEI;wVj ds bfrgkl esa lhfj;y iksVZ us dEI;wVj rFkk ;qfDr ds e/; MkVk lapkj dks laHko cuk;k gSA vf/kdrj lhfj;y iksVZ RS-232C rFkk RS-422 ekud dk vuq#i.k djrs gSA vf/kdka'kr% lhfj;y iksVZ dks ,d 9&fiu la;ksft= (Connector) ds #i esa cuk;k tkrk gSA ekbØkslkW¶a V MkWl a (DOS) rFkk foaMks (Window) i;kZoj.k esa lhfj;y iksVZ dks COM dEI;wVj foKku /30 iksVZ : COM1, COM2 vkfn iksVZ ds #i esa tkuk tkrk gSA lhfj;y iksVZ (Serial port) ,d lkekU; mi;ksx lEidZ (General Purpose Interface) gS, ftldk mi;ksx yxHkx lHkh ;qfDr;ksa tSls & ekml (Mouse), ekWMe (Modem), rFkk fizaVj (Printer) dks dEI;wVj ra= ls tksM+us esa fd;k tkrk gSA vk/kqfud dEI;wVjksa esa lhfj;y iksVZ ds LFkku ij ;w ,l ch (USB) (Universal Serial Bus) dk mi;ksx fd;k tkrk gSa fp= 2-17 lhfj;y iksVZ 2-13 13.22 iSjYy iksVZ (Parallel Port) iSjYy iksVZ (Parallel Port) lekarj lapkj (Parallel Communication) dk ,d HkkSfrd lEidZ (Physical Interface) gSA bls fizV a j iksVZ ;k flUVªkfs uDl iksVZ (Centronics Port) Hkh dgrs gSA IEEE1284 ekud bldk f}nSf'kd vuqokn (Version) gSaA iSjYy iksVZ (Parallel Port)s dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa fuf'pr ek=k esa fcV~l dk lekarj lapj.k djrk gSAa ilZuy dEI;wVj esa iSjYy iksVZ ds #i esa ,d 25& fiu la;ksft= dk mi;ksx fd;k tkrk gSaA iSjYy ikVZ dk mi;ksx fofHkUu ;qfDr;ksa tSls & fizaVj (Printer), fti Mªkbo (Zip Drive) , Ldsuj (Scanner), lkmaM dkMZ (Sound Card), ekWMe (Modem), lhMhjkse (CDROM) vkfn dks tksMus fp= 2-18 iSjYy iksVZ iksVZ esa fd;k tkrk gSA 2- 13 13.33 ;wfuoZly lhfj;y cl (Universal Serial Bus) ;wfuoZly lhfj;y cl (Universal Serial Bus) ,d vk/kqfud HkkSfrd lEidZ (Physical Interface) gSA vktdy USB us fofHkUu izdkjds lhfj;y o iSjYy iksVZ dks LFkkukUrfjr dj fn;k gSA USB fofHkUu dEI;qVj ;qfDr;kas tSls & ekml (Mouse), dh cksMZ (Keyboard), fizV a j (Printer), ckgkz Mªkbo fMLd (External Hard Disk) , Ldsuj (Scanner), ehfM;k Iys;j (Media Player), fMthVy dSejk (Digital Camera), ¶yS'k Mªkbo (Flash Drive) vkfn dks dEI;qVj ls tksMus esa l{ke gSaA vktdy bldk mi;ksx LekVZ Qksu, ohfM;ks dalksy (Video Console) rFkk AC ,MiVj (AC Adapter) ds e/; ikoj dkMZ (Power Cord) ds #i esa Hkh fd;k tkrk gSa fp= 2-19 ;w, lch la;ksf t= dEI;wVj foKku /31 ;wfuoZly lhfj;y cl (Universal Serial Bus) dh fuEu fo'ks"krk, gSa & 1. dEI;qVj gksLV dh rjg dk;Z djrk gSA 2. ,d ;w,lch dscy 5 ehVj rd yEch gks ldrh gSA 3. ;w,lch dscy es ikoj ds fy, nks rkj gksrs gS rFkk MkVk ds fy, rkj dk ,d fVoLVsM ;qXe gksrk gSA 4. ;w,lch dscy ds ikoj ds rkj ij dEI;wVj 5 oksYV ij 500 feyh,Eih;j ikoj iznku dj ldrk gSA 5. ;w,lch fMokbl gksV Lokiscy (Hot swapable) gS vFkkZr bls cl ls dHkh Hkh yxk;k ;k gVk;k tk ldrk gSA 2- 13 13.44 ih,l@2 iksVZ la;ksft= (PS/2 Port Connector) ih,l@2 iksVZ la;ksft= (PS/2 Port Connector) dk mi;ksx dhcksMZ rFkk ekml dks dEI;wVj ra= ls tksMus ds fy, fd;k tkrk gSA l~u 1987 esa lcls igys bUgs IBM ilZ u y dEI;wVj@2 Js.kh ds dEI;wVj esa yxk;k x;k FkkA blh ls bldk uke ih,l@2 iksVZ la;ksft= iM+kA fp= 2-20 ih,l@2 iksV Z la;ksft= dh cksMZ rFkk ekml la;ksft= dk fMtkbu fo|qrh; #i esa leku gksrh gS rFkk nksuksa leku lapkj izksVksdky dk mi;ksx djrs gSA ,d dEI;wVj ij dhcksMZ rFkk ekml ds fy, miYc/k ih,l@2 iksVZ dks vkil esa ,d nqljs ds fy, mi;ksx ugh fd;k tk ldrk gS D;ksfd nksuks ;qfDr;kW fofHkUu fuZns'k leqPp;ks dk mi;ksx djrk gSA 2-13 13.55 baQzkjSM iksVZ (Infrared Port) baQzkjSM iksVZ (Infrared Port) ,d ,slk iksVZ gS tks baQzkjSM izdk'k (Infrared Light) dk mi;ksx dj ,d ;qfDr ls nqljh ;qfDr MkVk dks Hkst ;k izkIr dj ldrk gSA ;g izk;% IrDA izkVs ksdky dk mi;ksx djrk gSAbldk mi;ksx dEI;wVj, ihMh, rFkk lSyQksu eas fd;k tkrk gSA jsfM;ks fQzdosalh (Radio Frequency) rduhd ( tSls& Cyw VqFk) ds vkus ij budk mi;ksx de gks x;k gSA ijUrq vkt Hkh /kjsyq midj.kks ds fjeksV daVªksy esa bl iksVZ dk mi;ksx fd;k tkrk gSA 2-13 13.66 Cyw VqFk (Bluetooth) Cyw VqFk de nwjh ij fLFkr fLFkj ;qfDr ls pyk;eku ;qfDr ds e/; ,d izkis jkbVjh vksiu ok;jySl rduhd (Properietory open wireless) dk ,d ekud gSA ;g pyk;eku ,oe~ fLFkj ;qfDr ds e/; mPp lqj{kk dk ilZuy ,fj;k usVodZ (Personal Area Network) (PAN) cukrk gSA Cyw VqFk dh dEI;wVj foKku /32 [kkst lu~ 1994 esa ,jhdlu (Ericssion) daiuh }kjk dh xbZ FkhA Cyw VqFk ds }kjk ,d ;qfDr ,d lkFk lkr vU; ;qfDr;ksa ds lkFk tqM+ ldrk gS rFkk lqjf{kr MkVk lapkj fd;k tk ldrk gSA fp= 2-21 lSyQksu Cyw VqFk egRoiw.kZ fcUnq 1- dEI;wVj rU= ds eq[; Hkkx % (1) flLVe ;wfuV (2) buiqV ;wfuV (3) vkmViqV ;wfuV 2- lsUVªy izkslsflax ;wfuV (CPUC % ;g dEI;wVj dk fnekx gksrk gSA bldk eq[; dk;Z izksxzkeksa dks fØ;kfUor djuk gSA 3- ,-,y-;w- % ;g ;wfuV vadxf.krh; ,oa rkfdZd fØ;k,¡ djus dk dk;Z djrh gSA 4 - dEI;wVj dk lcls egRoiw.kZ Hkkx ekbØksizkslslj gSA dEI;wVj esa ,d eq[; izkslslj o vU; dbZ lgk;d izkl s slj yxs gksrs gSaA 5 - dEI;wVj ds dk;Z djus dh xfr dks ekius ds fy;s dEI;wVj esa ,d fo'ks"k izdkj dh ?kM+h gksrh gSA 6 - izkslslj eq[;r% nks izdkj dh rduhdksa ls cuk;s tkrs gSA 7 - dEI;wVj esa iz;qDr gksus okyh clsa fuEu gSA ¼v½ MkVk cl ¼c½ ,Mªl s cl ¼l½ daVªky s cl 8 - dEI;wVj ds }kjk tc vuqns'kksa dk fØ;kUou fd;k tkrk gS rks lh-ih-;w- ds }kjk vuqn's kksa dks eSeksjh ls lh-ih-;w- esa fLFkr fofHkUUk jftLVjksa esa yk;k tkrk gSA 9- Le`fr izkFkfed laxzg.k ;qfDr gSA 10- Le`fr % dEI;wVj dk dk;Zdkjh laxzg gS tgk¡ MkVk] lwpuk vkSj izksxzke laxzfgr jgrs gSa vkSj vko';drk ds le; rRdky miyC/k gks tkrs gSAa 11- Le`fr dks eq[;r% nks Hkkxksa esa ck¡Vk tkrk gS& (1) eq[; Le`fr (2) cká Le`frA 12- fcV % Le`fr dh lcls NksVh bdkbZ gSA ckbujh vad iz.kkyh esa bldk eku 0 vFkok 1 gksrk gSA 13- ckbV % vkB fcV ds lewg dks ckbV dgrss gSaA lkekU;r% ,d djsDVj ¼vad ;k v{kj½ dks ,d ckbV ls O;Dr fd;k tkrk gSA 14- dEI;wVj esa eq[;r% nks izdkj dh Le`fr;k¡ ikbZ tkrh gSAa ¼v½ iz/kku ¼c½ viz/kku dEI;wVj foKku /33 15- iz/kku Le`fr Hkh nks izdkj dh gksrh gaAS ¼v½ RAM jSe ¼c½ ROM jkse 16- iz/kku Le`fr RAM vLFkkbZ o ROM LFkkbZ izd`fr dh gksrh gSA ;s Le`fr;k¡ v/kZ lqpkyd inkFkZ dh cuh gksrh gSA 1177- pqEcdh; Vsi] pqEcdh; fMLd] gkMZ fMLd] ¶ykWih fMLd] lh-Mh- jkse f}rh;d laxzg.k ;qfDr;ka gSaA 1188- dkWEiSDV fMLd (CD) MkVk laxzg.k dh ,d izdk'kh; ;qfDr gSA 19. fMftVy ohfM;ks fMLd (DVD) Hkh MkVk laxzg.k dh ,d izdk'kh; ;qfDr gS fdUrq bldh {kerk 19 CD dh rqyuk esa cgqr vf/kd gksrh gSA 2200- fti Mªkbo MkVk laxzg.k ,oa LFkkukUrj.k dh ,d mÙke pqEcdh; ;qfDr gSA 21. bUVsfytsUV fLVd MkVk LFkkukUrj.k ,oa laxgz .k dh vusd foy{k.k xq.kksa okyh uohure ;qfDr 21 gSA 22 22. lhfj;y iksVZ (Serial port) Js.kh lapkj (Serial Communication) dk ,d HkkSfrd lEidZ (Physical Interface) gS] tks dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa ,d fcV lwpuk vUnj ;k ckgj Hkstrk gSA 23 23. iSjYy iksVZ (Parallel Port) lekarj lapkj (Parallel Communication) dk ,d HkkSfrd lEidZ (Physical Interface) gSA bls fizaVj iksVZ ;k flUVªksfuDl iksVZ (Centronics Port) Hkh dgrs gSA 24 24. iSjYy iksVZ (Parallel Port)s dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa fuf'pr ek=k esa fcV~l dk lekarj lapj.k djrk gSAa 25 25. ,d ;w,lch dscy 5 ehVj rd yEch gks ldrh gSA 26 26. ;w,lch dscy esa ikoj ds fy, nks rkj gksrs gS rFkk MkVk ds fy, rkj dk ,d fVoLVsM ;qXe gksrk gSA 27 27. ;w,lch dscy ds ikoj ds rkj ij dEI;wVj 5 oksYV ij 500 feyh,Eih;j ikoj iznku dj ldrk gSA 28 28. ih,l@2 iksVZ la;ksft= (PS/2 Port Connector) dk mi;ksx dhcksMZ rFkk ekml dks dEI;wVj ra= ls tksMus ds fy, fd;k tkrk gSA 29 29. baQzkjSM iksVZ (Infrared Port) ,d ,slk iksVZ gS tks baQzkjSM izdk'k (Infrared Light) dk mi;ksx dj ,d ;qfDr ls nqljh ;qfDr MkVk dks Hkst ;k izkIr dj ldrk gSA 30 30. baQzkjSM iksVZ (Infrared Port) izk;% IrDA izksVksdky dk mi;ksx djrk gSA 31 31. Cyw VqFk de nwjh ij fLFkr fLFkj ;qfDr ls pyk;eku ;qfDr ds e/; ,d izksijkbVjh vksiu ok;jySl rduhd (Properietory open wireless) dk ,d ekud gSA 32 32. ;g pyk;eku ,oe~ fLFkj ;qfDr ds e/; mPp lqj{kk dk ilZuy ,fj;k usVodZ (Personal Area Network) (PAN) cukrk gSA 33 33. Cyw VqFk ds }kjk ,d ;qfDr ,dlkFk lkr vU; ;qfDr;ksa ds lkFk tqM+ ldrk gS rFkk lqjf{kr MkVk lapkj dj ldrk gSA dEI;wVj foKku /34 vH;klkFkZ iz'u cgqp;ukRed iz'u % 1dEI;wVj esa MkVk Lohdkj djus okyh ;qfDr gS& ¼v½ lh-ih-;w¼c½ lh-;w¼l½ buiqV ;wfuV ¼n½ vkmViqV ;wfuV 2,d ckbV esa gksrs gSa& ¼v½ 4 fcV ¼c½ 8 fcV ¼l½ 16 fcV ¼n½ 32 fcV 3izkFkfed laxzg.k ek/;e gS& ¼v½ gkMZ fMLd ¼c½ eSeksjh ¼l½ lh-Mh- jkse ¼n½ pqEcdh; Vsi dEI;wVj dh xfr ekih tkrh gS%& 4¼v½ ekbØkslSds.M esa ¼c½ fefy lSd.s M ¼l½ ihdks lSds.M esa ¼n½ uSuks lSd.s M ,d ckbV esa fcVl gksrh gSa%& 5¼v½ 4 ¼c½ 6 ¼l½ 8 ¼n½ 10 dEI;wVj dh eSeksjh fdrus izdkj dh gksrh gS%& 6¼v½ 2 ¼c½ 4 ¼l½ 6 ¼n½ 5 ‘RAM’ fdldk y?kq:i gS& 7¼v½ jhM ,Dlst eSeksjh ¼c½ jSUMe ,Dlst ekfuVj ¼l½ jSUMe ,Dlst eSeksjh ¼n½ buesa ls dksbZ ugha fuEu esa ls dkSulh dEI;wVj Le`fr dh ekid bdkbZ ugha gSA 8¼v½ KB ¼c½ MB ¼l½ GB ¼n½ CB bizkse (EPROM) gS& 9¼v½ u feVk;s tkuk okyk ¼c½ vLFkkbZ ¼l½ izkx s zkescy o bjslscy ¼n½ bjslscy ijUrq izksxzkescy ugha 10lh-ih-;w- ds lkFk yxh eSeksjh dks dgrs gSA ¼v½ L1– dS'k ¼c½ L2 – dS'k ¼l½ dS'k ¼n½ mijksDr esa ls dksbZ ugha 1111izdk'kh; rduhd dk iz;ksx gksrk gS& ¼v½ gkMZ fMLd esa ¼c½ ¶ykWih fMLd esa ¼l½ bad tSV fizUVj esa ¼n½ lh-Mh- jkse esa 1122ekbØks ¶ykWih dh lkekU;r% laxzg.k {kerk gksrh gS& ¼v½ 1.2 MB ¼c½ 650 MB ¼l½ 1.44 MB ¼n½ 2.8 MB dEI;wVj foKku /35 13- og iksVZ (Port), tks dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa ,d fcV lwpuk vUnj ;k ckgj Hkstrk gS& ¼c½ iSjYy iksVZ ¼v½ lhfj;y iksVZ ¼l½ ih,l@2 iksVZ ¼n½ ;q,lch iksVZ 14- ,d ;w,lch dscy dh yEckbZ gks ldrh gS& ¼v½ 25 ehVj ¼c½ 20 ehVj ¼l½ 5 ehVj ¼n½ 2 ehVj 15- Cyw VqFk pyk;eku ,oe~ fLFkj ;qfDr ds e/; mPp lqj{kk tks usVodZ cukrk gS] mls dgrs gS& ¼v½ LAN ¼c½ MAN ¼l½ WAN ¼n½ PAN vfry?kq ÙkjkRed iz ' u % 1- dEI;wVj rU= dh eq[; bdkb;ksa ds uke fyf[k,A 2- buiqV bdkbZ ds mnkgj.k crkb,A 3vadxf.krh; ,oa rkfdZd bdkbZ ds dk;Z fyf[k,A 4- flLVe ;wfuV ds vUrxZr vkus okys Hkkxksa ds uke fyf[k,A 5ekbØksizkl s slj D;k gS \ 6- flLVe ?kM+h fdl dk;Z ds fy;s mi;ksx esa yh tkrh gS \ 7izkslslj fdrus fcVl ds gksrs gS \ 8RISC o CISC fdlds izdkj gS\ 9dEI;wVj esa fdrus izdkj dh clsa gksrh gS \ uke fyf[k;s& 10- ,Dlsl le; (Access Time) D;k gS \ 11- MkVk dks fMLd ij i<+us o fy[kus dk dk;Z fdlds }kjk gksrk gS\ 12- MkWV eSfVªDl fizUVj fdl izdkj ds fizUVj dk mnkgj.k gS\ 13- ¶ykWih fMLd vkSj mlds vkoj.k esa fLFkr fNnz dks D;k dgrs gSa\ 14- ekbØks ¶ykWih dk O;kl fdruk gksrk gS\ 15- MhohMh dh lkekU;r% laxzg.k {kerk fdruh gksrh gS\ 16- MkVk laxgz .k ,oa LFkkukUrj.k dh lcls NksVh ;qfDr dk uke crkb,A 17- og iksVZ (Port), tks dEI;wVj ra= ls ;qfDr dks ;k ;qfDr ls dEI;wVj dks ,d le; esa fuf'pr ek=k esa fcV~l dk lekarj lapj.k djrk gS]mls D;k dgrs gS \ 18- ;w,lch dscy ds ikoj ds rkj ij dEI;wVj fdruh ikoj iznku dj ldrk gS \ 19- baQzkjSM iksVZ (Infrared Port) izk;% fdl izksVksdkWy dk mi;ksx djrk gS\ y?kqÙ kjkRed iz'u % 1- RAM vkSj ROM D;k gSa\ budk iwjk uke fyf[k,A dEI;wVj foKku /36 2izkl s slj fHkUu&fHkUu fcVl ds D;ks gksrs gSa \ 3- Le`fr;k¡ fdrus izdkj dh gksrh gSa buesa eq[; vUrj D;k gS \ 4- L1 o L2 dS'k eSeksjh esa D;k vUrj gS \ 5- lh-ih-;w- dh dS'k eSeksjh dk D;k dk;Z gS \ 6- lhMh jkse ,oa MhohMh ds mi;ksx esa D;k lko/kkfu;ka j[kh tkuh pkfg,\ 7- D;k ,d dEI;wVj ij dhcksMZ rFkk ekml ds fy, miYc/k ih,l@2 iksVZ dks vkil esa ,d nqljs ds fy, mi;ksx esa fy;k tk ldrk gS \ le>kb,A fucU/kkRed iz 'u % 1- dEI;wVj ds fofHkUu Hkkxksa dk o.kZu dhft, rFkk bldk CykWd js[kkfp= cukb,A 2- dEI;wVj esa eSeksjh dh vko';drk D;ksa gksrh gS\ dEI;wVj eSeksjh ds fofHkUu izdkjksa dk o.kZu dhft,A 3- iz/kku eSeksjh ds fofHkUu izdkjksa dks le>kb;sA 4- dEI;wVj esa bLrseky fd;s tkus okys eq[;r% izkl s slj dkSu&dkSu ls gS \ 5- dEI;wVj esa iz;Dq r gksus okyh fofHkUu clksa ds dk;ksZa dk o.kZu dfj;sA 6- gkMZ fMLd dh lajpuk o dk;Z iz.kkyh lfp= le>kb,A 7- lh-Mh-jkse D;k gS\ bldh dk;Z iz.kkyh rFkk blds mi;ksx fyf[k,A 8- MhohMh D;k gS bldh fo'ks"krk,a crkb,A MhohMh lhMh jkse dh rqyuk esa fdl izdkj csgrj gS\ 9- dEI;wVj esa iz;qDr gksus okyh fofHkUu izdkj ds iksVZ@la;ksft=ksa dks le>kb;sA mÙkjekyk cgqp;ukRed iz'u % 1- ¼l½ 2- ¼c½ 3- ¼c½ 4- ¼n½ 5- ¼l½ 6- ¼v½ 10- ¼l½ 11- ¼n½ 12- ¼l½ 13- ¼v½ 14- ¼l½ 15- ¼n½ 7- ¼l½ 8- ¼n½ 9- ¼l½ dEI;wVj foKku /37 3 dEI;wV j lkW¶Vos;j (Computer Software) 3-1 izLrkouk (Introduction) foxr o"kksaZ es O;kolkf;d izksxkz feax us fofHkUu mUur fdLe ds lkW¶Vos;j ,oa izksxzke dh lgk;rk ls gekjs MsLdVkWi dEI;wVjksa dks fdlh Hkh izdkj dk dk;Z djus dh l{kerk iznku dh gSA ;g ikB lEkfiZr gS lkW¶Vos;j dks ftlus dEI;wVj dks ,d /kjsyw uke nsus dk mRd`"V dk;Z fd;k gSA dEI;wVj dk dk;Z nks Hkkxks ls lapkfyr gksrk gSA 1 gkMZo; s j (Hardware) 2 lkW¶Vos;j (Software) 3 -2 gkMZos;j rFkk lkW¶Vos;j (Hardware & Software) gkMZos;j rFkk lkW¶Vos;j feydj ,d lEiw.kZ rU= dk fuekZ.k djrs gSaA dEI;wVj rU= ds vUrxZr tks Hkh midj.k] oLrq,¡] izksxzke vkfn vkrs gS] os lHkh ;k rks gkMZo; s j ds vUrxZr vkrs gSa ;k fQj lkW¶Vos;j ds vUrxZrA vr% bu nksuksa dk Kku gksuk vko';d gSA gkMZos;j (Hardware) %& dEI;wVj flLVe ds os lHkh HkkSfrd (Physical) ,oa ewrZ (Tangible) Hkkx ftUgsa ge ns[k ldrs gSa rFkk Nw Hkh ldrs gSa] gkMZos;j dgykrs gSaA lh-ih-;w-] dh&cksMZ] ekml] fizUVj] Lihdj vkfn gkMZos;j ds mnkgj.k gSaA bu lHkh Hkkxksa dks ge ns[kus ds lkFk&lkFk Nw Hkh ldrs gSAa lkW¶Vos;j (Software) %& dEI;wVj ls dk;Z djokus ds fy, gesa dEI;wVj dks crkuk gksxk fd mls D;k djuk gSA bl dk;Z ds fy, gesa dEI;wVj dks funsZ'k nsus iM+rs gSaA bu funsZ'kksa dks gh lkW¶Vos;j dgk tkrk gSA bu funsZ'kksa ds lewg dks izkx s zke Hkh dgk tkrk gSA lkW¶Vos;j gh gkMZos;j dks fØ;k'khy cukrk gSA dksbZ Hkh gkMZos;j rHkh dk;Z djrk gS] tc mls mlls lEcfU/kr lkW¶Vos;j ls funsZ'k feyrs gSaA lkW¶Vos;j bysDVªkWfud :i esa gksrs gSa ftUgsa ns[kk ;k Nqvk ugha tk ldrkA 3.3 lkW¶Vos;j ds izdkj (Types of Software) lkW¶Vos;j dk mi;ksx dEI;wVj rFkk mi;ksxdrkZ ds e/; dh fØ;kvksa dks lapkfyr djus ds fy;s fd;k tkrk gS rFkk budk mi;ksx fdlh dk;Z dks dEI;wVjkbTM djus ds fy;s Hkh fd;k tkrk gSA ;s rhu izdkj ds gksrs ga%S & dEI;wVj foKku /38 1 flLVe lkW¶Vos;j (System Software) 2 ,Iyhds’ku lkW¶Vos;j (Application Software) 3 ;wfVfyVh lkW¶Vos;j ( Utility Software) 3.4 flLVe lkW¶Vos;j (System Software) dEI;wVj dks lapkfyr djus okys lkW¶Vos;j] tks dEI;wVj ij fdlh izksxzke ds fØ;kUou ds fy, vko';d gksrs gSa] flLVe lkW¶Vos;j dgykrs gSAa ;s dEI;wVj dks vf/kd izHkko'kkyh ,oa mi;ksxh cukrs gSaAflLVe lkW¶Vos;j izkx s kz ekas dk og lewg gS tks fd dEI;wVj ds HkkSfrd Hkkxksa rFkk lkW¶Vos;j dks fu;fU=r djrk gSA flLVe lkW¶Vos;j ds vHkko esa dEI;wVj ij ,Iyhds'ku lkW¶Vos;j dk mi;ksx ugha fd;k tk ldrk gSA flLVe lkW¶Vos;j dEI;wVj fo'ks"kKksa }kjk rS;kj fd;s tkrs gSAa ;s dEI;wVj rU= dk ,d vR;ko';d Hkkx gSaA;g dEI;wVj mi;ksx s drkZ rFkk dEI;wVj gkMZo;s j ds e/; dh fØ;kvksa dks fu;fU=r djrk gS rFkk ;g ,Iyhds’ku lkW¶Vos;j dks Hkh fØ;kfUor djrk gS blfy;s bls ,Iyhds’ku lkW¶Vos;j dk vk/kkj Hkh dgk tkrk gSA flLVe lkW¶Vos;j ds dk;Z%& 1 flLVe lkW¶Vos;j vU; lHkh lkW¶Vos;jksa dk fu"iknu djrk gSA 2 ;g mi;ksxdrkZ rFkk dEI;wVj gkMZos;j ds e/; lEcU/k LFkkfir djrk gSSA 3 bldk mi;ksx fofHkUu lkW¶Vos;jksa ds fuekZ.k ds fy;s fd;k tkrk gSA 4 dEI;wVj L=ksrksa tSls eSeksjh] izkslslj] buiqV vkmViqV fMokbl dks fu;fU=r djrk gSA flLVe lkW¶Vos;j esa vxzfyf[kr izksxzke lfEefyr gksrs gSa %& 1 vkWijsfVax flLVe (Operating System) 2 ;wfVfyVh izkx s kz e (Utility Program) 3 izkx s kz feax Hkk"kk,a (Programming Languages) 4 Hkk"kk lalk/kd (Language Translator) 3.4.1 vkWijsfVax flLVe (Operating System) %& ,sls izksxkz eksa dk lewg tks dEI;wVj ds leLr dk;ksZa dk lapkyu djrk gS] vkWijsfVax flLVe dgykrk gSA ;g dEI;wVj vkSj mi;ksxdÙkkZ (User) ds chp ;kstd dM+h Hkh gksrk gSA tSls gh ;wtj dEI;wVj vkWu djrk gS] vkWijsfVax flLVe dEI;wVj dh eSeksjh esa laxfz gr gks tkrk gS vkSj fQj dEI;wVj dh leLr fØ;kvksa dk lapkyu djrk gSA MS-DOS, WINDOWS, UNIX, LINUX, SOLARIS, BhartiOO vkfn dqN izpfyr vkWijsfVax flLVe gSaA dEI;wVj foKku /39 3.4.1.1 vkWijsfVax flLVe dh vko';drk (Need of Operating System) %& dEI;wVj esa miyC/k lalk/kukas ds mfpr ,ao dq'kyrk iqod Z mi;ksx ds fy, rFkk mi;ksxdrkZ dh lqfo/kk ds fy, ,sls lkW¶Vos;jksa dh vko';drk gksrh gS tks lalk/kuks dk izca/ku ,ao fu;a=.k dj ldsAvkWijsfVax flLVe ;s lHkh dk;Z djrk gS rFkk blds vfrfjDr fuEu lsokW, iznku djrk gS & ¼1½ buiqV&vkmViqV vkWijs'ku (Input Output Operation) ¼2½ Qkby flLVe esuhiqy's ku (File System Manipulation) ¼3½ ,jj~ fMVsd'ku (Error Detection) ¼4½ dE;quhds'ku (Communication) ¼5½ izksxkz e ,xthD;q'ku (Program Execution) ¼6½ fjlkslZ vyksd's ku ,aM eSut s esaV (Resource Allocation and Management) ¼7½ fMLdLisl@eSeksjh@izksll s vdkmfVax (Disk Space/Memory/Process Accounting) ¼8½ izksVd s 'ku (Protection) vkfn 3.44.11.22 vkWijsfVax flLVe ds izeq[k dk;Z (Main Functions of Operating System)& s kz e rFkk mlls lecfU/kr MkVk dks eSeksjh 1-” Le`fr izcU/ku ¼Memory Management½& fdlh Hkh izkx eas dgk¡ j[kuk gS rFkk dgk¡ ls ykuk gS bldk fu/kkZj.k vkWijsfVax flLVe gh djrk gSA 2 Qkby izcU/ku (File Management)&”blds vUrxZr Qkby dks mlds uke ls laxgz rFkk okfil ykus dk dk;Z fd;k tkrk gSA 3 fuos’k”fuxZe izcU/ku (Input Output Management)& blds vUrxZr dEI;wVj es MkVk nsus vFkok dEI;wVj ls MkVk ysus ds fy;s dke vkus okyh ;qfDr;ksa ¼Devices½ dk izcU/ku j[krk gSA 4 ;wtj bUVjQsl (User Interface) & blds vUrxZr vkWijsfVax flLVe mi;ksxdrkZ ds lkFk lecU/ k j[krk gS ftlls mi;ksxdrkZ dk dke ljy gks tkrk gSA 5 s kz e mi;ksxdrkZ dks dk;ksaZ dh tfVyrkvkas ls nwj djok nsrs gaAS ;wfVfyVht (Utilities) & ;s izkx 3 .44 .11.33 vkWijsfVax flLVe ds izdkkjj (Types of Operating System)& 1. cSp izkslsflax flLVe (Batch Proccessing System) bl izdkj ds vkWijsfVax flLVe dk mi;ksx dEI;wVj ds vkajfHkd nkSj eas fd;k tkrk FkkA nks dk;ksZ ds e/; lsVvi le; de djus ds fy, izkx s zke yksMj (Program Loader) ds fopkj dk mi;ksx fd;k x;kAbl izdkj ds vkWijsfVax flLVe esa buiqV fMokbl ls dk;ksZ ds Lor% (automatic) yksfMax dh O;oLFkk dh xbZ FkhAbl izdkj dk vkWijsfVax flLVe dk;ksZ dks ,d Js.khc) rjhds ls lalkf/kr djrk FkkA dEI;wVj foKku /40 2. eYVh izksxzkfeax flLVe (Multi Programming System) bl izdkj ds vkWijsfVax flLVe esa ,d CPU ij ,d le; esa ,d ls vf/kd dk;ksZ dks lalkf/kr fd;k tkrk gSAblls dk;ksZ dks rsth ls lalkf/kr fd;k tk ldrk gS rFkk blls dEI;wVj dk izR;qRrj le; (Response Time) c<+k gSA 3 . baVj,fDVo flLVe (Interactive System) bl izdkj ds vkWijsfVax flLVe esa mi;ksxdrkZ VfeZuy dh enn ls dEI;wVj ls lh/kk tqM+k gksrk gSA bl izdkj ds vkWijsfVax flLVe mi;ksxdrkZ dks nks izdkj ds lEidZ (Interface) & DjsDVj ;qtj baVjQsl (Character User Interface (CUI), xzkfQdy ;qtj baVjQsl (Graphical User Interface (CUI) miyC/k djkrs gSA 4. Vkbe 'ks;fjax flLVe (Time Sharing System) bl izdkj ds vkWijsfVax flLVe esa dEI;wVj izkl s slj ds le; dks ,d gh le; esa fn;s x;s ,d ls vf/kd dk;ksaZ ds e/; ckWaVk tkrk gSA 5 . eYVh izkslsflax vkWijsfVax flLVe (Multi Proccessing Operating System) bl izdkj ds vkWijsfVax flLVe] dEI;wVj esa mifLFkr nks ;k nks ls vf/kd CPU ij ,d eSeksjh rFkk vU; lalk/kukas dk mi;ksx dj ],d gh le; esa fn;s x;s ,d ls vf/kd dk;ksZ dk ,d le; esa izkslsflax djrk gSA 6 . eYVh Vklfdax vkWijsfVax flLVe (Multi Tasking Operating System) eYVh Vklfdax vkWijsfVax flLVe esa jSe (RAM) eSeksjh esa mifLFkr ,d ls vf/kd dk;ksZa dks bl izdkj lalkf/kr fd;k tkrk gS fd dEI;wVj ds lalk/kuksa dk vf/kdre mi;ksx fd;k tk ldsA 7. jh;y Vkbe vkWijsfVax flLVe (Real Time Operating System) jh;y Vkbe vkWijsfVax flLVe dk;Z fo'ks"k dh le; dh ck/;rk dks /;ku esa j[k cuk;s tkrs gSAbl izdkj ds vkWijsfVax flLVe dk ,d viuk le; ca/ku gksrk gSAjh;y Vkbe vkWijsfVax flLVe dk mi;ksx m|ksxksa ¼tSls & ikoj IYkakV, dsfedy baMLVªh vkfn½ esa fofHkUu izfdz;kvks ds Lor% lapkyu (Auotomation) dh izfdz;k ds fu;a=.k ds fy, fd;k tkrk gSA 8 . MhlVªhC;qVsM vkWijsfVax flLVe (Distributed Operating System) bl izdkj ds vkWijsfVax flLVe esa fdlh x.kuk ds dk;Z dks] HkkSfrd #i ls vyxvyx LFkku ij fLFkr dEI;wVjkas ij ckWV fn;k tkrk gSA ;s dEI;wVj eYVh izkslslj flLVe dh rjg eSeksjh rFkk DykWd Vkbe 'ks;j ugha djrs gSA fofHkUu LFkkukas ij fLFkr ;s dEI;wVj MkVk dk vknku iznku mPp rhozrk dh lapkj ykbu ;k cl ds }kjk djrs gSA dEI;wVj foKku /41 3.4.2 ;wfVfyVh izksxzke (Utility Program) %& ;s izkx s kz e dEI;wVj ds fofHkUu Hkkxksas ds j[k&j[kko rFkk ejEer dk dk;Z djrs gSAa mnkgj.k&fMLd fjdojh izkx s zke] MkVk cSdvi izksxzke vkfnA 3.4.3 izksxzkfeax Hkk"kk,a (Programming Languages) %& dEI;wVj dks fn, tkus okys funs'Z k dEI;wVj dh Hkk"kk esa gh fn, tkrs gS]a D;ksfa d dEI;wVj viuh Hkk"kk gh le>rk gS] euq"; dh Hkk"kk ughaA vkt fofHkUu fo'ks"krkvksa okyh fofo/k dEI;wVj izkx s kz feax Hkk"kk,a miyC/k gSAa izR;sd Hkk"kk ds vius ekud vkSj fof'k"V fu;e gSAa csfld] dkscksy] QksjVªku] ikLdy] lh] tkok] vkWjd s y vkfn izkx s kz feax Hkk"kkvksa ds dqN mnkgj.k gSA 3.4.4 Hkk"kk lalk/kd (Language Translator) %& ;s ,sls izksxkz e gSa tks ,d Hkk"kk esa funs'Z k Lohdkj dj vU; Hkk"kk esa mlds lerqY; funsZ'k rS;kj djrs gSaAdEikbyj (Compiler), bUVjizsVj (Interpreter), vlsEcyj (Assembler) Hkk"kk lalk/kd ds dqN mnkgj.k gSA s kz feax Hkk"kk dks e’khuh dEikbyj & ;g ,d flLVe lkW¶Vos;j gS ftldk mi;ksx mPp Lrjh; izkx Hkk"kk es ifjofrZr djus ds fy;s fd;k tkrk gS dEikbyj iwjs izkx s ke dks ,d lkFk dEikby djrk gS rFkk fofHkUu =qfV;ksa dks muds ykbu uEcj ds lkFk iznf’kZr djrk gS dEikbyj }kjk izkx s kz e fu"iknu ds le; izkxs kz e dk eSeksjh esa gksuk t#jh ugha gSA &”os Hkk"kk izksll s j tks mPp Lrjh; izkx s zkfeax Hkk"kk dks iafDr nj iafDr e’khuh Hkk"kk bUVjizsVj & es ifjofrZr djrs gSa bUVjizsVj dgykrs gSAa fdlh Hkh iafDr eas =qfV gksus ij og rRdky iznf’kZZr dj nsrk gSA bUVizsVj }kjk izksxkz e fu"iknu ds le; izksxzke dk eSeksjh esa gksuk vko’;d gSA vlsEcyj & &”;g vlsEcyh Hkk"kk esa fy[ks izkx s kz e dks e’khuh Hkk"kk eas ifjofrZr djrk gSA 3.3.2 ,Iyhds’ku lkW¶Vos;j (Application Software) ,Iyhds’ku lkW¶Vos;j izkx s kz eksa dk og lewg gS tks fdlh fo'ks"k rFkk fuf'pr dk;ksZa dks djus ds mÌs'; ls cuk, x, gksa A dk;Z ds vk/kkj ij budk fuekZ.k fdlh Hkh Hkk"kk esa fd;k tk ldrk gSA MkWDVj] bathfu;j] fMtkbuj] ,MoksdsV vkfn dks viuh fHkUu vko';drkvksa gsrq fHkUu&fHkUu izdkj ds izkx s zkeksa dh vko';drk gksrh gSA ;s is'ksoj O;fDr ,Iyhds'ku lkW¶Vos;j ds iz;ksx ls vius dk;ksZa dk fu"iknu cgqr gh csgrj <ax ls dj ldrs gSaA vkt cSafdax] chek] QSDVjh] vLirky] bathfu;fjax vkfn esa budk dkQh mi;ksx gksus yxk gSA f'k{kk cksMZ ,oa fo'ofo|ky;ksa }kjk ijh{kk ifj.kke rS;kj djus] dk;kZy;ksa esa osru fcy cukus ds fy, Hkh fofHkUu ,Iyhds'ku lkW¶Vos;j dk mi;ksx fd;k tkrk gSA ;s izkx s kz e dEI;wVj dks fof’k"V dk;Z djus dh l{kerk iznku djrs gS tSls oMZ izkl s fs lax (Word Processing)] bUosUVªh dUVªky s (Inventory Control)] is&jksy (Payroll)] jsYos vkj{k.k vkfn ;s lHkh lkW¶Vos;j bl Js.kh ds vUrxZr vkrs gSA dEI;wVj foKku /42 oMZ izkslslj (Word Processor ) oMZ izkslslj ,d ,slk lkW¶Vos;j gS tks 'kCnksa esa fy[ks x/kka'k ds Åij dk;Z dj ldsAa fdlh Hkh i= vFkok x|ka'k dks Vkbi djds bl izdkj ls iznf'kZr djuk fd og lqUnj fn[ks lkFk gh lkFk i<+us esa Hkh vklku gksA ;s dk;Z oMZ izkslslj }kjk fd;s tkrs gSaA dEI;wVj dh lgk;rk ls oMZ izkslslj }kjk ge os lHkh dk;Z dj ldrs gSa tks fd ,d O;fDr iSu] dkxt] 'kCndks"k] }kjk dj ldrk gSA ;s dk;Z dEI;wVj }kjk rhoz xfr ls lEikfnr fd;s tk ldrs gSaA dEI;wVj ij oMZ izkslslj }kjk Vkbi fd;s i= dk izk:i vPNk fn[ksxk] i<+us ;ksX; ;k i<+us esa vklku gksxkA cktkj esa dbZ izdkj ds izksxzke miyC/k gSa tks i= Vkbi djus vFkok i= dks O;kdj.k ds vuqlkj vPNs rjhds ls fy[kus esa enn djrs gSASa oMZ izkl s l s j esa lk/kkj.kr% fuEu izdkj dh lqfo/kk,a miyC/k gksrh gSa tks vko';drkuqlkj mi;ksx esa yh tk ldrh gSAa ¼1½ Vkbi fd;s x;s 'kCnksa dk jax] vkdkj o vkd`fr cnyukA ¼2½ 'kCnksa ds uhps js[kk [khapuk] 'kCnksa dks xgjs djuk vFkok 'kCnksa dks frjNs dj nsukA ¼3½ fofHkUu iafDr;ksa ds izFke v{kjksa ;k vfUre v{kjksa dks ,d lh/k esa j[kuk ;k v{kjksa dks iafDr ds fcYdqy e/; esa j[kukA ¼4½ 'kCnksa dh Lisfyax dh xyfr;k¡ nwj djuk djus dh {kerkA ¼5½ ist ds pkjksa rjQ ckWMZj cukukA ¼6½ fofHkUu iafDr;ks dks o.kZØekuqlkj O;ofLFkr djukA ¼7½ izR;sd ist ij gSMj ;k QqVj MkyukA ¼8½ fofHkUu izdkj ds fp=@xzkQ Mkyuk vkfnA blds vfrfjDr Hkh fofHkUu izdkj dh lqfo/kk,a gksrh gSaA ftuds ckjs esa ge ekbØkslkW¶V oMZ esa i<a+sxsA bu lqfo/kkvksa dk mi;ksx dj ge fofHkUu izdkj ds dk;Z tSls O;olkf;d i= ys[ku] lekpkj i= dk lEiknu] lk/kkj.k i= ys[ku vkfn dk;Z vklkuh ls dj ldrs gSaAcktkj esa fofHkUu izdkj ds oMZ izkslslj miyC/k gSaA muesa dqN eq[; fuEu gS ¼1½ oMZ LVkj (Word Star) ¼2½ ,e- ,l- oMZ (M.S. Word) ¼3½ oMZ ijQsDV (Word Perfect) ¼4½ lkW¶VoMZ (Soft Word) ¼5½ v{kj (Akshar) 3.3.2.1 3.3.2.2 LizsM'khV (Spreadsheet) LizsM'khV, iafDr (ROW) rFkk LrEHk (Column) esa O;ofLFkr MkVk ,oe~ VsDlV dh Vscy gksrh gSA LizsM'khV esa mifLFkr izR;sd eku (MkVk ;k VsDlV) dk nwljs eku ls iwoZ fu/kkZfjr lEcU/k gksrk gSA ;fn fdlh eku esa ifjofrZr fd;k tkrk gS rks mlls lEcaf/kr eku esa Lor% ifjorZu gks tkrk gSA LizsM'khV, vuqiz;ksx lkW¶Vos;j ds ,sls oxZ dks fu#fir djrk gS ftudh enn ls dEI;wVj foKku /43 LizsM'khV dks bysDVªkfs ud #i esa cuk;k ,ao ifjofrZr fd;k tk ldrk gSA LizsM'khV izR;sd MkVk@VsDlV dks ,d lSy (Cell) esa MkVk ds izdkj (Type) dks vklkuh ls ifjHkkf"kr fd;k tk ldrk gSAlSy (Cell) ds uke dks yscy (Label) rFkk buds e/; laca/k dks QkWea Zwyk (Formula) dgrs gSALizsM'khV esa mifLFkr iafDr;ksa (ROWS) rFkk LrEHkksa (Columns) dh pkSM+kbZ rFkk ÅWapkbZ dks vklkuh ls ifjofrZr fd;k tk ldrk gSA LizM s 'khV dk iz;ksx ctV rS;kj djus ] lkexzh izc/a ku] ykxr izc/a ku] vk;dj x.kuk vkfn esa fd;k tk ldrk gSAcktkj esa miyC/k dqN LizsM'khV vuqiz;ksx lkW¶Vos;j fuEu gS ¼1½ yksV~l&123 (Lotus-123) ¼2½ ,e- ,l- ,Dlsy (M.S. Excel) 3.3.2.3 izLrqrhdj.k VwYl (Presentation Tools ) izLrqrhdj.k VwYl mi;ksxdrkZ dks LykbM 'kks rFkk fjiksVZ ds fy, mPp dksfV dh best cukus dh lqfo/kk iznku djrk gSA izLrqrhdj.k VqYl dk mi;ksx lgt ,ao vljnkj izLrqrhdj.k djus ds fy, fd;k tkrk gS bldk mi;ksx & 1. izkt s Ds Vj ij fn[kkus ds fy, Vªklisjsalh dk fuekZ.k 2. fo'ks"k ,ao izHkkoh dEI;wVj Ldzhu dk fueZk.k 3. fdlh lsfeukj ds fy, izLrqrhdj.k dk fueZk.k 4. Ldzhu ij #ijs[kk vkfn crkus okyh izLrqfr dk fueZk.k vkfn esa fd;k tkrk gSA ,e- ,l- ikojikabV (M.S. Powerpoint ) bldk mnkgj.k gSA 3.3.2.4 MkVkcsl eSutesaV flLVe (Database Management System ) ,d dk;Z ls lEcaf/kr MkVk ;k lqpukvksa ds leqg dks tc O;ofLFkr <+x ls j[kk tkrk gS rks mls MkVkcsl dgrs gSA Mhch,e,l ,d izksxkekas dk leqg gS tks MkVk@lwpuk laxzfgr djus] la'kksf/kr djus rFkk mlls dksbZ vU; lwpuk fudkyus vFkok tksM+us dh lqfo/kk iznku djrs gSA blesa MkVk dks ,df=r dj ,d funsZf'kdk cuk yh tkrh gS] ftlls fofHkUu lwpuk izkIr dh tk ldrh gSA Mhcsl&III (Dbase-III), ,e ,l ,Dlsl (MS Access) vkfn blds mnkgj.k gSA ;wfVfyVh lkW¶Vos;j (Utility Software) os izksxzke tks dEI;wVj flLVe vkSj lkW¶Vos;j ds j[k&j[kko rFkk ejEer ds fy;s fodflr fd;s tkrs gS ;wfVfyVh lkWQVos;j dgykrs gSA ;s izkx s kz eksa esa ,fMfVax djus mudh =qfV;k¡ nwj djus vkfn dk;Z djrs gSA ;wfVfYkVh izksxkz e dks ljoj ( Server) izksxkz e Hkh dgrs gSA ;s lkW¶Vos;j le;&le; ij dEI;wVj ij pydj dEI;wVj dh eSeksjh dks xfr'khy o vf/kd vkadMs+ xzg.k djus yk;d cuk ldrs gSAa bu lkW¶Vos;j ds }kjk vko';d vkadMksa dks cSdvi cukdj j[k ldrs gSA mUgsa iqu% iz;ksx dj ldrs gaS vkfnA fo.Mks&98 vkWijsfVax flLVe ds lkFk ;s lkW¶Vos;j ¼Vwy½ Hkh 'kkfey gSaA ;fn ;s Vwy viuh vko';drk dks iwjk ugha dj ik jgsa gks rks ge vU; lkW¶Vos;j dks mi;ksx esa ys ldrs gSaA tSls ukWjVu ;wfVfyVh] Mcaffee, Quick Heal vkfnA 3.3.3 dEI;wVj foKku /44 ;s lHkh lkW¶Vos;j dEI;wVj ij fdlh u fdlh izdkj dh lqfo/kk iznku djrs gSa vr% bUgs ;wfVfyVh lkW¶Vos;j (Utility Software) dgrs gSaA ;s ;wfVfyVh lkW¶Vos;j lkekU;r% fuEu dk;ksaZ ds fy, iz;ksx esa yk;s tkrs gSa %& ¼1½ gkMZ fMLd dks lgh j[kus ds fy, LdSu fMLdA ¼2½ gkMZfMLd dks xfr'khy cuk;s j[kus ds fy, fMLd MhÝsxesUVj ¼3½ Qkbyksa dks cSdvi ysus o cSdvi dks iqu% dEI;wVj ij Mkyus ds fy, fjLVksj izkx s zkeA ¼4½ fMLd ij vf/kd vkadM+s Hk.Mkfjr djus ds fy, dEizsflax izksxzkeA ¼5½ dEI;wVj ij ok;jl dh tkap djus o mls gVkus ds fy, ,UVh ok;jl izksxzke vkfnA 3-3.33 .11 QksYMj / Qkby eSustesUV Vwy 3-3 Qkby eSustesUV Vwwy dk vFkZ mu lkW¶Vos;j ls gS tks Qkby o QksYMjksa dks O;ofLFkr djus ds fy, iz;qDr gksrs gSaA fofHkUu dEI;wVj mi;ksxdrkZ vyx&vyx rjhdksa ls Qkbyksa dks O;ofLFkr j[krs gSaA fo.Mks esa fo.Mks ,DlIyksjj rFkk ekbZ dEI;wVj uked nks lkW¶Vos;j miyC/k gS ftudk iz;ksx dj ge Qkbyksa] QksYMjksa vkfn dks bPNkuqlkj O;ofLFkr dj ldrs gSaA fo.Mks ,DlIyksjj (Window Explorer) ;g ,d ,slk izksxzke gS ftldk mi;ksx dj ge ¶ykWih] gkMZ fMLd ;k vU; fMLd ij mifLFkr Qkby] o QksYMjksa dks ns[k ldrs gSa o mUgsa O;ofLFkr dj ldrs gSaA bl izksxzke ls Qkby dks ,d LFkku ls vU; LFkku ij dkWih dj ldrs gSa] LFkkukUrfjr dj ldrs gSa] gVk ldrs gSa vkfnA 3-3.33 .22 fMLd eSustesUV Vwy (Disk Management Tool) 3-3 fMLd eSustesUV Vwy mu lkW¶Vos;jksa dks dgrs gaS tks gekjh gkMZ fMLd] ¶ykWih fMLd vkfn dks O;ofLFkr djus ds dke vkrs gSaA ftlls fd gkMZ fMLd ;k vU; fMLd rhoz xfr ls dk;Z djus esa l{ke jg ldsaA cktkj esa bl dk;Z ds fy, fofHkUu lkW¶Vos;j miyC/k gSA buesa ls dqN lkW¶Vos;j tSls -LdSu fMLd (Scan Disk)] fMÝsxesUVj (Defragmenter) vkfn vklkuh ls de dher ij izkIr fd;s tk ldrs gSa ge dsoy LdSu fMLd o fMÝsxesUVj ds ckjs esa i<sxsaA fMLd dks fMÝsxesUV djuk %& fo.Mks vkWijsfVax flLVe Hkh vU; vkWijsfVax flLVe dh rjg fMLd ij tgka Hkh [kkyh LFkku gksrk gS ogha ij vkadM+s fy[k nsrk gSA vFkkZr~ vkadMs+ eSeksjh esa yxkrkj LFkkuksa ij Hk.Mkfjr ugha jgrsA tc ge fdlh Qkby ;k vkadM+ksa dkss eSekssjh ij Hk.Mkfjr djrs gSa rks Qkby ds vyx&2 Hkkx vyx&vyx [kkyh LFkkukas ij HkaMkfjr gks tkrs gS ijUrq vkWijsfVax flLVe dks ;g /;ku jgrk gS fd ,d Qkby ds fofHkUu Hkkx eSeksjh esa dgka¡&dgk¡ ij gSa ]vkSj mudk Øe D;k gSaA vr% Qkby dks i<+us ij dksbZ Hkh ijs’kkuh ugha gksrhA tc ge Qkby dks i<uk pkgsa rks vkWijsfVx flLVe Qkby ds fofHkUu Hkkxksa dks eSeksjh esa vyx&vyx LFkku ij Hk.Mkfjr gksus ds dkj.k Qkby dks i<+us esa vf/kd le; yxrk gSA Qkby dks dEI;wVj foKku /45 vyx&vyx LFkkuksa ij VqdM+ksa esa Hk.Mkfjr gksuk ÝsxesUV’ku dgykrk gSA ftrus vf/kd ÝsxesUV gksaxs mruh gh dEI;wVj dh xfr /kheh gksxhA ;fn ge Qkby ds bu VqdM+ksa dk yxkrkj ,d LFkkuksa ij Hk.Mkfjr dj ldsa rks dEI;wVj dh xfr c<+ ldrh gSA Qkby ds fofHkUu VqdMs+ tks fd eSseksjh esa vyx&vyx LFkku ij Hk.Mkfjr gSa] dks yxkrkj ,d lkFk Hk.Mkfjr djuk fMÝsxesUVs’ku dgykrk gSA blfy, gesa dEI;wVj ij ,d eghus esa ,d ckj fMÝsxesUVs’ku lkW¶Vos;j pyk ysuk pkfg;sA ftlls fd Qkby ds fofHkUu Hkkx yxkrkj ,d LFkkuksa ij Hk.Mkfjr jg ldsaA vkSj dEI;wVj dh xfr rst jg ldsA 3-3.33.33 LdSufMLd Vwy (Scan Disk Tool) 3-3 tSlk fd ge tkurs gS fd dEI;wVj vius vki esa ,d dfBu ¼dkEWiysDl½ flLVe gSA dEI;wVj ij dk;Z djus ds nkSjku dEI;wVj esa fofHkUu izdkj ds vkUrfjd fØ;k,a lEiUu gksrh gSaA bu fØ;kvksa ds ckjs es gesa tkudkjh Hkh ugha gskrh gS tSls fofHkUu Qkbyksa dks izkFkfed eSeksjh esa Mkyuk] budks Øekuqlkj fu"ikfnr djuk] vuko';d Qkbyksa dks izkFkfed eSeksjh ls f}rh;d eSeksjh esa Mkyuk vkfnA bu fØ;kvksa ds lEiknu ds nkSjku dEI;wVj esa xyfr;ka gksus dh laEHkkouk cuh jgrh gSA ;fn le;&le; ij bu xyfr;ksa dks lq/kkjk u tk;s rks xEHkhj ifj.kke gks ldrs gSAa bu xyfr;ksa ls cpus ds fy, ;k xyfr;ksa ds dkj.k gksus okys ifj.kkeksa ls cpus ds fy, LdSufMLd lkW¶Vos;j dk mi;ksx djuk pkfg;sA ;g lkW¶Vos;j gkMZfMLd dks lqjf{kr j[krk gSA ftl izdkj MkWl vkWijsfVax flLVe esa pSd fMLd dek.M dk;Z djrk FkkA mlh izdkj LdSu fMLd fo.Mks vkWijsfVax flLVe esa dk;Z djrk gSA uj (Virus Scanner/Cleaner) yhuj 3-3.33.44 ok;jl LdSujj/DDyh 3-3 ok;jl tho foKku esa ok;jl dk vFkZ dhVk.kqvksa ls gksrk gS tks ;fn 'kjhj ds vUnj izo's k dj tk;as rks 'kjhj lkekU; dk;Z ugha dj ikrkA blh izdkj dEI;wVj fo"k; esa ok;jl dk vFkZ mu izksxzkeksa ls gksrk gS tks ;fn dEI;wVj esa izos'k dj tk;sa rks dE;wVj esa ok;jl ds izos'k ds dkj.k fofHkUu izdkj dh ijs'kkfu;ka mRiUu gks ldrh gSaA vr% ok;jl ,d fo'ks"k izdkj ds izksxzke gSa tks oSls rks vU; lkW¶Vos;j izksxkz e dh rjg gh gksrs gSaA ijUrq ;s izksxkz e dEI;wVj o mlesa Hk.Mkfjr vkadM+ksa dks uqdlku igqapkus ds fy, gksrs gSaA ;s ok;jl dEI;wVj dh vU; Qkbyksa ds lkFk feydj dEI;wVj dh lkekU; dk;Z iz.kkyh dks ckf/kr dj nsrs gSaA bu ok;jl izksxzke dh fo'ks"krk ;s gksrh gSa fd ;s Lor% gh viuh izfrfyfi rS;kj dj ldrs gSa rFkk lk/kkj.kr% ;s fdlh vU; Qkby ds lkFk tqM+dj laxzfgr gksrs gSAa vFkkZr~ ;fn ge bu ok;jl izkx s zke dh Qkby <wa<+s rks ;s Qkbysa ugh feysxhA ok;jl gks rks mls fudkysaA dEI;wVj foKku /46 ,aVhok;jl izksxzke (Antivirus Program) ftl izdkj ok;jl ,d izksxzke gS vkSj bldh ,d fo'ks"k izdkj ds dk;Z djus dh {kerk gSA mlh iz d kj cktkj es a ,s l s iz k s x z k e Hkh miyC/k gS a tks bu ok;jl iz k s x z k e S dh mifLFkr dks tkap ldrs gSa vkSj bUgs dEI;wVj esa ls gVk ldrs gSaA ijUrq ;g vko';d ugh gS fd dksbZ Hkh ,aVh ok;jl izkx s zke lHkh izdkj ds ok;jl dh mifLFkfr dh tkap dj ldrs gksa vkSj mUgs gVk ldrs gksaA tSlk ge i<+ pqds gSa fd ;s ok;jl izksxzke gksrs gaS rks budh ,d fo'ks"k dk;Z fof/k Hkh gksxhA bl fo'ks"k dk;Z fof/k ds vk/kkj ij gh budh mifLFkfr dh tkap lEHko gSA ;fn ok;jl dh dk;Z fof/k bl izdkj dh gks fd ,aVh ok;jl mldh igpku dj lds rks ,aVh ok;jl ml ok;jl dh u rks mifLFkfr crk;sxk vkSj u gh mls fudky ik;sxkA vr% ;g vko';d gS fd ,aVh ok;jl ,slk gksuk pkfg;s tks yxHkx lHkh izpfyr ok;jl dh igpku djus dh {kerk j[krk gksA gkykafd ;g lEHko ugha gS fd ,d ,aVh ok;jl lHkh ok;jl dks igpku ldsA ij ftruk vf/kd laEHko gks ,aVh ok;jl le;kuqlkj viMsVsM djrs jguk pkfg, ftlls fd ;g izpfyr ok;jl dh igpku dj ldsaA fofHkUu ,aVhok;jl izksxzke cktkj esa miyC/k gSA tSls ukWjVu ,aVh ok;jl] vkbZ- ,- oh- Vh] LekVZMkWx vkfn bu lHkh ,aaVhok;jl dh dk;Ziz.kkyh vyx&vyx gksrh gSA ijUrq lHkh ,aVhok;jl ,d&,d djds lHkh Mªkbo dh tkap djrs gSa vkSj fQj muesa ls ok;jl gVkrs gSaA tc Hkh fdlh ,aVhok;jl izksxzke dks pyk,a rks igys dEI;wVj dks ,slh ¶ykWih ;k lhMh ls cwV djsa tks ok;jl xzflr u gksA bl ¶ykWih dks jkbV izkVs DV j[ksAa cwV djus ds ckn ,aVhok;jl izkx s kz e pyk,aA egRoiw.kZ fcUnq 1- dEI;wVj dk dk;Z nks Hkkxksa ls lapkfyr gksrk gS gkMZo; s j ,oa lkW¶Vos;j 2- gkMZos;j dEI;wVj ds HkkSfrd Hkkxksa dks n'kkZrk gSA 3- izksxkz e] izksxkz eksa dk lewg lkW¶Vos;j dgykrk gSA 4- lkW¶Vos;j rhu izdkj ds gksrs gSA 1- flLVe lkW¶Vos;j 2- ,Iyhds'ku lkW¶Vos;j 3- ;wfVfyVh lkW¶Vos;j 5- dEikbyj] bUVjizsVj] vlsEcyj] vkWijsfVax flLVe] flLVe lkW¶Vos;j ds mnkgj.k gaSA 6- vkWijsfVax flLVe nks izdkj ds gksrs gaS 1- flaxy ;wtj 2- eYVh ;wtj 7- MkWl fMLd vkWijsfVax flLVe dk laf{kIr uke gSA 8. ;wfVfyVh lkW¶Vos;j % ,sls lkW¶Vos;j ftudk mi;ksx dj gekjs dEI;wVj dks LoLF; vFkkZr rst xfr ls pyus yk;d o vf/kd vkadM+s xzg.k djus yk;d vkfn cuk ldrs gaSA 9. ok;jl% ,sls izkx s zke ftuds dEI;wVj ij vkus ls dEI;wVj dh dk;Zi.z kkyh vFkok vkadMs+ [kjkc dEI;wVj foKku /47 gks ldrs gSaA buesa Lo;a dks dkWih djus dh {kerk gksrh gSA 10. ,aVh ok;jl+ & ,sls izkx s zke tks dEI;wVj ij ok;jl dh mifLFkfr dks n'kkZrk gSA vkSj ok;jl dks dEI;wVj esa ls fudkyus dk dk;Z djrk gSA mnkgj.k& ukWjVu ,aVh ok;jl]LekVZ MkWx] vkbZ-,-oh]Vh vkfn 13. ok;jl ls lqj{kk& bl gsrq ckgj dh Qkbyksa ;k ¶ykWfi;ksa dk mi;ksx de ls de djsaA ikbjsVsM lkW¶Vos;j dk mi;ksx u djsaA vokaNuh; yksxksa ds dEI;wVj iz;ksx ij izfrca/k gks vkfnA 12. Qkby eSustesUV %&,sls lkW¶Vos;j ftudk iz;ksx fofHkUu Qkbyksa ;k QksYMjksa dks O;ofLFkr djus ds dke vkrs gaSA O;ofLFkr djus ls rkRi;Z Qkby dks ,d LFkku ls nwljs LFkku ij ys tkuk] Qkby gVkuk] Qkby <w<u+ k ]QksYMj cukuk vkfn ls gSA mnkgj.k%& fo.Mkst ,DlIyksjj] ekbZ dEI;wVj vkfnA 13 13. fo.Mkst ,DlIyksjj pykuk%& LVkVZ&izksxzke&fo.Mkst ,DlIyksjj 14. fMLd eSustesaUV Vwy%& ,sls lkW¶Vos;j ftudk iz;ksx dj gkMZ fMLd] ¶ykWih fMLd vkfn dks LoLFk vFkkZr rst xfr'khy j[k ldrs gSA mnkgj.k %& fMLd fMÝsxesUVj] LdSu fMLd vkfnA 15. fMLd fMÝsxesUVj%& ;g lkW¶Vos;j fMLd ij Hk.Mkfjr Qkby ds Hkkxksa dks ,d lkFk ¼ikl&ikl½ ykrk gS ftlls Qkby dks i<us esa de le; yxsA 16. LdSu fMLd%& ;g lkW¶Vos;j fMLd ij fLFkr dfBukbZ;ksa tSls cSM lsDVj] vkfn dks lgh dj ldrk gSA rFkk fMLd ls lEcfU/kr vU; tkudkfj;ksa dks iznf'Zkr djrk gSA tSls dqy txg] dqy QksYMj ] dqy Qkby] Nqih Qkbykas dh la[;k] [kkyh txg vkfn A vH;kl iz ' u cgq p ;ukRed iz ' u 1- dEI;wVj esa iz;ksx fd, tkus okys HkkSfrd midj.k dgykrs gaSA ¼v½ lkW¶Vos;j ¼c½ gkMZos;j ¼l½ ¶ykWih ¼n½ lh-ih-;w- 2- lWk¶Vos;j fdrus izdkj ds gksrs gaSA ¼v½ nks ¼c½ pkj ¼l½ rhu ¼n½ buesa ls dksbZ ugha- 3- ,sIyhds'ku lkW¶Vos;j D;k gaS \ ¼v½ lkW¶Vos;j ¼c½ flLVe lkW¶Vos;j ¼l½ gkMZos;j ¼n½ ,sIyhds'ku dEI;wVj foKku /48 4- izksxzkfeax Hkk"kk esa fy[ks izksxkz e dks dEI;wVj dh Hkk"kk ¼e'khuh Hkk"kk½ esa ifjofrZr djus dk dk;Z dkSu djrk gS\ ¼v½ dEikbyj ¼c½ bUVjizsVj ¼l½ v vkSj c nksuksa ¼n½ buesa ls dksbZ ugha 5- dkSu gkMZos;j dh Js.kh esa ugha vkrk gSA ¼v½ ¶ykWih ¼l½ jSe ¼c½ ekWuhVj ¼n½ foUMkst 6- fuEu esa ls ;wfVfyVh lkW¶Vos;j dkSulk gS\ ¼v½ oMZ izksll s j (Word processor) ¼c½ LizsM'khV (Spread sheet) ¼l½ Mh-ch-,e-,l- (DBMS) ¼n½ fyadj (Linker) 7- ok;jl ,d izdkj ds ¼v½ izkx s zke gksrs gSaA ¼c½ thok.kq gksrs gSaA ¼l½ mijksDr esa ls dksbZ ughaA ¼n½ midj.k 8- fMLd fMQzsxesUVj dks dg ldrs gSAa ¼v½ Qkby eSutesUV Vwy ¼c½ fMLd eSustesUV Vwy ¼l½ ,UVh ok;jl ¼n½ mijksDr esa ls dksbZ ughaA 9- ok;jl ¼v½ vkadMs+ [kjkc dj ldrs gSaA ¼c½ gkMZ fMLd dks [kjkc dj ldrs gaSA ¼l½ dEI;wVj dh dk;Ziz.kkyh [kjkc dj ldrs gSaA ¼n½ mijksDr lHkh A vfry?kqÙ kjkRed iz' u 1- gkMZos;j fdls dgrs gS\ 2- lkW¶Vos;j fdls dgrs gS\ 3- lkW¶Vos;j fdrus izdkj ds gksrs gS\ 4- vlsEcyj fdls dgrs gS\ 5- vkWijsfVax flLVe fdls dgrs gS\ 6- LdSu fMLd lkW¶Vos;j fdl dke vkrk gS \ 7- ok;jl ls vki D;k le>rs gS \ 8- ,aVhok;jl ls vki D;k le>rs gS \ 9- ;wfVfyVh lkW¶Vos;j fdls dgrs gS \ dEI;wVj foKku /49 10- fo.Mks ,DlIyksjj fdl dke vkrk gS \ y?kq Ù kjkRed iz ' u 1- vkWijsfVax flLVe dh fo'ks"krkvksa dks le>kb;sA 2- flLVe lkW¶Vos;j dks le>kb;sA fucU/kkRed iz ' u 1- lkW¶Vos;j D;k gS\ ;s fdrus izdkj ds gksrs gS\ izR;sd dks mnkgj.k lfgr Li"V dhft,A 2- vkWijsfVax flLVe ds eq[; dk;ksZ dk o.kZu dhft,A 3- Qkby eSustesUV Vwy ls vki D;k le>rs gS \ fdlh ,d Qkby eSustesUV Vwy ij fVIi.kh fyf[k;sA 4- fMLd eSut s esUV Vwy ls D;k vk'k; gS \ mÙkjekyk 1- ¼c½ 2- ¼l½ 3- ¼v½ 4- ¼l½ 5- ¼n½ 6- ¼n½ 7- ¼v½ 8- ¼c½ 9- ¼n½ dEI;wVj foKku /50 4 la [ ;k flLVe] ckbujh xf.kro dEI; dEI;ww Vj V j dks M (Number System, Binary Arithmetic & Computer Codes) la[;k flLVe&ifjp; (Number System-Introduction) izR;sd dEI;wVj vadks] v{kjksa o vU; fo'ks"k v{kjksa dks dwV :i esa vius vki esa laxzfgr djrk gSA tc ge MkVk dks dEI;wVj esa laxfz gr djrs gSa rks MkVk ,d fHkUu :i ls dwV dksM ds :i esa e'khu esa laxfz gr fd;k tkrk gSA vr% bl dwV dksM dks le>us ls iwoZ gesa la[;k flLVe dks le>uk gksxkA bl ikB dk ize[q k mns'; ;g gS fd vki lkekU; la[;k vk/kkjHkwr vad flLVe o dqN izpfyr flLVe tks fd dEI;wVj fo'ks"kKksa ds }kjk mi;ksx esa fy;s tkrs gSa] dks le>s A 4-1 ckbujh la[;k flLVe (Binary Number System) ;g flLVe yxHkx n'keyo la[;k flLVe tSlk gh gSA blesa vk/kkj 10 ds LFkku 2 fy;k tkrk gSA bl flLVe esa dsoy nks vad ¼0 o 1½ mi;ksx esa fy;s tkrs gSaA bl flLVe esa lcls cMh ,d vad dh la[;k 1 gS tks fd vk/kkj 2 ls ,d de ekuh tkrh gSA izR;sd ckbujh la[;k esa vadksa dk LFkku vk/kkj ¼2½ dh ?kkr dks O;Dr djrk gSA bl i)fr esa lcls nk;ha fLFkfr esa ¼20½] nk;sa ls f}rh; fLFkfr esa ¼21½ vkSj blh Øekuqlkj 22] 23] 24]-----------------vr % ckbujh la[;k 10101 ¼10101½2 ds led{k n'keyo la[;k gksxh % ¼1× 24½++ $ ¼0 23½ $ ¼1 22½ $ ¼0 21½ $ ¼1 20½ ;k 16$0$4$0$1 ;k 21 fdlh Hkh vad flLVe esa fdlh la[;k dks O;Dr djus ds fy;s vk/kkj ds LFkku ij lcfL+ØIV ds }kjk fy[kk tkrk gS tSls ¼10101½2 +¾ ¼21½10 ckbujh vad dks lkekU;r% fcV (Binary Digit) cksyk tkrk gS tks fd 0 vFkok 1 gSA izR;sd ckbujh la[;k esa n fcVl gksxh og n fcV dh la[;k dgyk,xhA Vsfcy 1&1 esa 3 fcV dh ckbujh la[;k ,oa blds lEkrqY; n'keyo dh la[;kvksa dks n'kkZ;k x;k gSA dEI;wVj foKku /51 ckbujh 000 001 010 011 100 101 110 111 n'keyo lerqY; 0 1 2 3 4 5 6 7 /;ku jgs fd ckbujh la[;k flLVe esa flQZ nks gh vad ¼0 o 1½ gksrs gSAa blfy;s n'keyo i)fr dh la[;k 2 dks ckbujh i)fr esa 10 ¼,d o 'kwU;½ fy[kk o i<+k tk;sA nwljk egRoiw.kZ rF; gS fd 3 fcVl ls 0 o 1 ds la;ksx ls vf/kdre 23 ¼8½ la[;k,sa cukbZ tk ldrh gSaA vr% n'keyo i)fr dh la[;k,sa 0 ls 2n-1 dks ckbujh dh n fcV dh la[;k ls cuk;k tk ldrk gSA 4-2 vkWDVy la[;k flLVe (Octal Number System) vkWDVy la[;k flLVe esa vk/kkj 8 gksrk gSA blfy;s bl la[;k flLVe esa flQZ vkB vad ¼0] 1] 2] 3] 4] 5] 6] 7½ gksrs gSaA blesa lcls cMk vad 7 gksrk gSA bl i)fr esa izR;sd vkWDVy la[;k esa izR;sd vkWDVy vad vk/kkj 8 dh ?kkr }kjk O;Dr fd;k tkrk gSA vr% vkWDVy la[;k 2057 dks n'keyo i)fr ds lerqY; fuEu izdkj ls fy[k ldrs gSaA ¼2×83½ $ ¼0×82½ $ ¼5×81½ $¼7×80½ ;k 1024 $ 0 $ 40 $ 7 ;k 1071 vr% ¼2057½8 ¾ ¼1071½10 /;ku ls ns[kk tk;s rks ;g irk pyrk gS fd vkWDVy la[;k i)fr esa flQZ 8 vad gksrs gSa vr% izR;sd vkWDVy vad dks ckbujh dh 3 fcVl ds }kjk O;Dr fd;k tk ldrk gSA bls le>us ds fy;s lkj.kh 1-1 dks ns[kk tk ldrk gSA 4-3 gSDlkMslhey la[;k flLVe (Hexadecimal Number System) bl flLVe esa la[;k dk vk/kkj 16 gksrk gSA vk/kkj 16 gksus ds ifj.kkeLo:i blesa 16 vad ;k izrhd gksrs gSA izFke 10 vad rks n'keyo la[;k i)fr ds vuqlkj 0] 1] 2] 3] 4] 5] 6] 7] 8] 9 gksrs gSa] 'ks"k N% vadksa dks A, B, C, D, E, o F ds }kjk O;Dr fd;k tkrk gS] tks fd Øe'k% n'keyo iz.kkyh dh la[;kvksa 10] 11] 12] 13] 14] 15 ds leku ekus tkrs gSaA lcls cMk vad F n'keyo iz.kkyh dh la[;k 15 ds cjkcj gksrk gSA gSDlkMslhey iz.kkyh esa izR;sd vad 16 dh ?kkr dks O;Dr djrk gSA vr% gSDlkMslhey dh la[;k (1 A F)16 n'keyo la[;k iz.kkyh dh fuEu la[;k ds lerqY; gksxh% ( 1×162 ) + ( A×161) + ( F×160) ;k (1×256) + (10×16) + (15×1) ;k 256+160 +15 dEI;wVj foKku /52 ;k 431 vr% (1 AF)16 = (431)10 pwafd gSDlkMslhey la[;k iz.kkyh esa 16 vad gksrs gSa vr% gSDlkMslhey ds izR;sd vad dks ckbujh dh 4 fcV~l (24 =16) }kjk O;Dr Hkh fd;k tk ldrk gSA 4-4 nwljh iz.kkyh dh la[;k esa ifjofrZr djuk (Converting from one Number System to another) pwafd ge gekjs thou esa n'keyo iz.kkyh ds vadksa dks bLrseky djrs gSa] blfy, tks la[;k n'keyo iz.kkyh esa fy[kh tk;s mldk dksbZ eryc fudkyk tk ldrk gSA ge la[;k dks fdlh Hkh la[;k iz.kkyh esa fy[k ldrs gS vkSj fdlh Hkh iz.kkyh dh la[;k dks ge fdlh nwljh iz.kkyh dh la[;k esa ifjofrZr dj ldrs gSaA pwfa d dEI;wVj esa nh tkus okyh buiqV o izkIr dh tkus okyh vkmViqV n'keyo iz.kkyh dh la[;k gksrh gS] blhfy;s la[;k dk ,d iz.kkyh ls nwljh iz.kkyh esa ifjofrZr djus ds fy;s dbZ rjhds miyC/k gSa ftuds ek/;e ls fdlh Hkh vk/kkj dh la[;k dks nwljs vk/kkj dh la[;k esa ifjofrZr fd;k tk ldrk gSA 4-4-1 fdlh vU; vk/kkj dh la[;k dks n'keyo dh la[;k esa ifjofrZr djuk (Converting to Decimal from another Base) fuEufyf[kr rhu pj.kksa ds }kjk fdlh Hkh vU; vk/kkj dh la[;k dks n'keyo iz.kkyh dh la[;k esa ifjofrZr fd;k tk ldrk gSA pj.k&1 % izR;sd vad dk LFkkuh; ewY; Kkr djsaA ¼;g vad dh fLFkfr o la[;k iz.kkyh ds vk/kkj ij fuHkZj gksrk gSA½ pj.k&2 % pj.k &1 esa Kkr fd;s x;s LFkkuh; ewY; dks ml fLFkfr dh la[;k ls xq.kk djsaA pj.k&3 % pj.k &2 esa Kkr fd;s x;s xq.kuQyksa dk ;ksx dhft,A ;g ;ksx gh n'keyo dh la[;k ds lerqY; gksxkA mnkgj.k&1 ¼11001½2 ¾ ¼\½10 pj.k&1 % izR;sd vad dk LFkkuh; ewY; fudkyuk dkye la[;k nk;sa ls LFkkuh; ewY; 1 20 ¾ 1 2 21 ¾ 2 3 22 ¾ 4 4 23 ¾ 8 5 24 ¾ 16 pj.k&2 % LFkkuh; ewY;ksa dks mudh fLFkfr okyh la[;k ls xq.kk djuk 16 8 4 2 1 dEI;wVj foKku /53 ×1 16 ×1 8 ×0 0 ×0 0 pj.k&3 %xq.ku dk ;ksx djuk 16 $ 8 $ 0 $ 0 $ 1 ¾ 25 vr% ¼11001½2 ¾ ¼25½10 mnkgj.k&2 ¼4706½8 ¾ ¼\½ 10 pj.k&1 % dkye la[;k nk;sa ls 1 2 3 4 pj.k&2 % 512 64 8 1 ×4 2048 pj.k&3 % ×7 448 ×0 0 ×1 1 dkWye ewY; 80 ¾ 1 81 ¾ 8 82 ¾ 64 83 ¾ 512 ×6 6 2048$448$0$6 ¾ 2502 vr% ¼4706½8 ¾ ¼2502½10 mnkgj.k&3 (1AC)16 = ( )10 gy% (1AC)16 = 1×162 + A×161 + C×160 = 1×256 + 10×16 + 12×1 = 256 + 160 + 12 = (428)10 mnkgj.k&4 (4052)7 = (?)10 gy% (4052)7 = 4×73 + 0×72 + 5×71 + 2×70 = 4×343 + 0×49 + 5×7 + 2×1 = 1372 + 0 + 35 + 2 = (1409)10 4-4-2 vk/kkj 10 okyh la[;k dks fdlh vU; vk/kkj okyh la[;k esa ifjofrZr djuk (Converting from Base 10 to a New Base (Division-Remainder Technique) fuEufyf[kr pkj pj.kksa ds }kjk 10 ds vk/kkj okyh la[;k dks fdlh vU; vk/kkj okyh la[;k esa ifjofrZr fd;k tk ldrk gSA pj.k 1 % n'keyo dh la[;k dks ftl vk/kkj dh la[;k esa cnyuk gks ml vk/kkj ls ml la[;k esa Hkkx yxkvks pj.k 2 % izFke pj.k ls izkIr 'ks"kQy dks u;s vk/kkj dh la[;k ds lcls nk;ha vksj dk vad ekusA pj.k 3 % izkIr HkkxQy dks ml vk/kkj ls fQj ls Hkkx yxkvksA pj.k 4 % pj.k&3 ls izkIr 'ks"kQy dks u;s vk/kkj dh la[;k ds lcls nk;ha vad ds ck;as fy[ksA dEI;wVj foKku /54 pj.k 3 o 4 dks ckj&ckj djsa vkSj izkIr 'ks"kQy dks nk;sa ls ck;sa fy[krs tk;as tc rd pj.k&3 esa HkkxQy 0 izkIr u gksA /;ku jgs fd vafre 'ks"kQy gh u;s vk/kkj okyh la[;k dk vfUre ck;k¡ vad gksxkA (25)10 = (?)2 mnkgj.k&1 gy % pj.k 1 o 2 % 25@2 ¾ HkkxQy 12 o 'ks"kQy 1 pj.k 3 o 4 % 12@2 ¾ HkkxQy 6 o 'ks"kQy 0 pj.k 3 o 4 % 6@2 ¾ HkkxQy 3 o 'ks"kQy 0 pj.k 3 o 4 % 3@2 ¾ HkkxQy 1 o 'ks"kQy 1 pj.k 3 o 4 % 1@2 ¾ HkkxQy 0 o 'ks"kQy 1 vr% (25)10 = (11001)2 mnkgj.k&2 (42)10 gy% 2 2 2 2 2 2 vr% = (?)2 42 21 10 5 2 1 0 'ks"kQy 0 1 0 1 0 1 (42)10 = (101010)2 mnkgj.k&3 (952)10 = (?)8 8 952 8 8 8 119 14 1 0 'ks"kQy 0 7 6 1 vr% (952)10 = (1670)8 mnkgj.k&4 (428)10 = (?)16 16 16 16 vr% 428 26 1 0 (428)10 = (1AC)16 12 = C 10 = A 1 'ks"kQy 0 0 'ks"kQy mnkgj.k&5 (100)10 = (?)5 5 5 100 20 dEI;wVj foKku /55 5 4 0 vr% (100)10 = (400)5 4 4-4-3 vk/kkj 10 ds vykok vU; fdlh vk/kkj dh la[;k esa ifjofrZr djuk (Converting from a Base other than 10 to a Base other than 10) fuEufyf[kr nks pj.kksa ds }kjk mijksDr fyf[kr vk/kkj dh la[;k esa ifjofrZr fd;k tk ldrk gSA pj.k&1 % okLrfod la[;k dks loZizFke 10 ds vk/kkj dh la[;k esa ifjofrZr dfj;sA pj.k&2 % n'keyo vk/kkj dh la[;k dks bfPNr vk/kkj dh la[;k esa ifjofrZr dfj;sA mnkgj.k&1 % (545)6 = (?)4 gy % pj.k&1 % 6 ds vk/kkj ls 10 ds vk/kkj esa ifjofrZr dfj;sA 545 = 5×62 + 4×61 + 5×60 = 5×36 + 4×6 + 5×1 = 180 + 24 + 5 = (209)10 pj.k&2 % (209)10 dks vk/kkj 4 esa ifjofrZr djuk 4 209 1 'ks"kQy 4 52 0 4 13 1 4 3 3 0 vr% (209)10 = (3101)4 vFkkZr (545)6 = (3101)4 mnkgj.k&2 (101110)2 = (?)8 gy % pj.k&1 % (101110)2 dks vk/kkj 10 esa ifjorZuA (101110)2 = 1×25 + 0×24 + 1×23 + 1×22 + 1×21 + 0×20 = 32 + 0 + 8 + 4 + 2 + 0 = (46)10 pj.k&2 % (46)10 dk vk/kkj 8 esa ifjorZuA 8 46 8 5 0 vr% (46)10 = (56) 8 vFkkZr (101110)2 = (56)8 6 5 'ks"kQy dEI;wVj foKku /56 mnkgj.k&3 (11010011)2 = (?)16 pj.k&1 % (11010011)2 = (?)10 (11010011)2 = 1×27 + 1×26 + 0×25 + 1×24 + 0×23 + 0×22 + 1×21 + 1×20 = 1×128 + 1×64 + 0×32 + 1×16 + 0×8 + 0×4 + 1×2 + 1×1 = 128 + 64 + 0 + 16 + 0 + 0 + 2 + 1 = (211)10 pj.k&2 % (211)10 = (?) 16 211 3 13 13=D 0 vr% (211)10 = (D3)16 vFkkZr (11010011)2 = (D3)16 16 16 'ks"kQy 4-4-4 ckbujh ls vkWDVy esa ifjofrZr djus dk y?kq rjhdk (Shortcut Method for Binary to Octal Conversion) fuEufyf[kr pj.kksa ds }kjk ckbujh la[;k dks vkWDVy la[;k esa ifjofrZr fd;k tk ldrk gSA pj.k&1 % nk;sa ls izkjEHk djrs gq;s rhu&rhu ckbujh vadksa ds lewg cuk;asA pj.k&2 % rhu ckbujh vadksa ds lewg dks vkWDVy la[;k esa ifjofrZr djsaA mnkgj.k&1 (101110)2 = (?)8 pj.k&1 % 101 110 pj.k&2 % (101)2 = 1×22 + 0×21 + 1× 20 =4+0+1 = 58 (110)2 = 1×22 + 1×21 + 0×20 =4+2+0 = 68 vr% (101110)2 = (56)8 mnkgj.k&2 gy % (1101010)2 = (?)8 (1101010)2 = 001 101 1 5 010 2 ¼nk;sa ls 3 vadksa dk lewg½ = (152) 8 ¼izR;sd lewg dks vkWDVy ds vad esa ifjorZu½ vr% (1101010)2 = (152)8 dEI;wVj foKku /57 4 -4-5 vkWDVy la[;k dks ckbujh la[;k esa ifjorZu dk y?kq rjhdk (Shortcut Method for Octal to Binary Conversion) fuEufyf[kr pj.kksa ds }kjk mDr dk;Z fd;k tk ldrk gSA pj.k&1 % vkWDVy vad dks ckbujh ds rhu vadksa esa ifjorZu djsaA pj.k&2 % izkIr lHkh ckbujh vadksa dks ,d lkFk fy[kdj ,d ckbujh la[;k fyf[k;sA mnkgj.k&1 % (562)8 = (?)2 pj.k&1 % izR;sd vkWDVy ds vad dk ckbujh ds 3 vadksa esa ifjorZuA 58 = 1012 68 = 1102 28 = 0102 pj.k&2 % lHkh lewgksa dks ,d lkFk fyf[k;sA (562)8 = 101 110 5 6 vr% (562)8 = (101110010)2 mnkgj.k&2 % (6751)8 = (?)2 010 2 gy % (6751)8 = 110 111 101 001 6 7 5 1 = (110 111 101 001)2 vr% (6751)8 = (110 111 101 001)2 4-4-6 ckbujh ls gS DlkMs l hey es a ifjorZ u djus dk y?kq rjhdk (Shortcut Method for Binary to Hexadecimal Conversion) fuEufyf[kr pj.kksa ds vuqlkj djus ij ckbujh la[;k ds lerqY; gSDlkMslhey la[;k izkIr dh tk ldrh gSA pj.k&1 % nk;ssa ls izkjEHk djrs gq, ckbujh ds pkj&pkj vadksa dk lewg cuk;saA pj.k&2 % izR;sd pkj ckbujh vadksa ds lewg dks ,d gSDlkMslhey dh la[;k esa ifjorZu djsaA mnkgj.k&1 (11010011)2 = (?)16 pj.k&1 % 1101 0011 pj.k&2 % (1101)2 = 1×23 + 1×22 + 0×21 + 1×20 =8+4+0+1 = 1310 = D16 (0011)2 = 0×23 + 0×22 + 1×21 + 1×20 =0+0+2+1 = 316 vr% (11010011)2 = (D3)16 dEI;wVj foKku /58 mnkgj.k&2 (10110101100)2 = (?)16 (10110 10 1100)2 = 0101 1010 1100 ¼nk;sa ls 4 vadksa dk lewg½ ¾ 5 AC vr% (10110101100)2 = (5 AC)16 4-4-7 gSDlkMslhey la[;k dks ckbujh la[;k esa ifjofrZr djus dk y?kq rjhdk (Shortcut Method for Hexadecimal to Binary Conversion) fuEufyf[kr pj.kksa ds }kjk mijksDr dk;Z fd;k tk ldrk gSA pj.k&1 % izR;sd gSDlkMslhey vad dks ckbujh ds pkj vadks ds }kjk fyf[k;sA pj.k&2 % lHkh lewgksa ds ckbujh vadks dks ,d lkFk fy[ksaA (2 AB)16 = ( )2 mnkgj.k&1 gy % pj.k&1 % izR;sd gSDlkMslhey vad dks ckbujh ds pkj vadks esa ifjorZuA 216 = 210 = 00102 A16 = 1010= 10102 B16= 1110 = 10112 pj.k&2 % ckbujh vadks ds lewg dks ,d lkFk fy[ksaA 2AB16= 0010 1010 1011 2 A B vr% 2AB16 = (001010101011)2 mnkgj.k&2 % (ABC)16 = (?)2 gy % (ABC) 16 = 1010 1011 1100 A B C = (101010111100)2 vr% (ABC)16 = (101010111100)2 4-5 fHkUUk la[;k,sa (Fractional Numbers) ckbujh la[;k iz.kkyh esa fHkUUk la[;kvksa dks Bhd mlh izdkj fufeZr fd;k tkrk gS tSls dh n'keyo iz.kkyh esa la[;k dks fufeZr fd;k tkrk gSA mnkgj.k& 0.235 = (2×10-1) + (3×10-2) + (5×10-3) vkSj 68.53 = (6×101) + (8×100) + (5×10-1) + (3×10-2) blh izdkj ckbujh la[;k iz.kkyh esa dEI;wVj foKku /59 0.101 = (1×2 ) + (0×2 ) + (1×2-3) -1 -2 o 10.01 = (1×21) + (0×20) + (0×2-1) + (1×2-2) ckbujh dk n'keyo Bhd n'keyo iz.kkyh ds n'keyo dh rjg gh dk;Z djrk gSA mnkgj.k&1 % (110.101)2 = (?)10 gy % (110.101)2 = 1×22 + 1×21 + 0×20 + 1×2-1 + 0×2-1 + 1×2-3 =4 +2 +0 + 1 2 +0 + = 6 + 0.5 + 0.125 = (6.625)10 (127.54)8 = ( )10 mnkgj.k&2 (127.54)8 = 1×82 + 2×81 + 7×80 + 5×8-1 + 4×8-2 = 64 + 16 +7 + + = 87 + 0.625 + 0. 0625 = (87.6875)10 (2B. C4)16 = (?) 10 mnkgj.k&3 (2B.C4)16 = 2×161 + B×160 + C×16-1 + 4×16-2 = 32 + 11 + + 15C 44 16 8256 64 = 43 + 0.75 + 0.015625 = (43.765625)10 4-6 ckbujh vad xf.kr o dEI;wVj dksM (Binary Arithmetic & Computer Codes) dEI;wVj ds Le`fr dks’k dh lcls NksVh bdkbZ fcV gksrh gS] ftldh dsoy 2 voLFkk,sa gks ldrh gSa] ftUgsa ge 0 o 1 ls fu:fir djrs gSaA ckbujh la[;k iz.kkyh (Binary Number Stystem) esa 0 o 1 vad iz;qDr gksrs gSaA vr% dEI;wVj ds lanHkZ esa lkjh x.kuk,sa f}vk/kkjh iz.kkyh esa gksrh gSaA leLr f}vk/kkjh la[;k iz.kkyh esa lHkh vadxf.krh; izfØ;k,a tksM]+ ckdh] xq.kk o Hkkx n'keyo la[;k i)fr ds leku gh gksrs gSaA 4-6-1 f}vk/kkjh ;ksx (Binary Addition) f}vk/kkjh ;ksx n'keyo ;ksx ls ljy gSA f}vk/kkjh vadks dks fuEu fu;ekuqlkj tksM+k tkrk gSA ;ksx (Sum) gkfly (Carry) 0$0¾ 0 & dEI;wVj foKku /60 0$1¾ 1 & 1$0¾ 1 & 1$1¾ 0 1 nks vadks dks tksM+us ij izkIr gkfly (Carry) dks n'keyo iz.kkyh dh rjg vxys LFkku ij Hkstdj tksMk+ tkrk gSA mnkgj.k&1 12$13 ¼12½10 ¾ ¼1100½2 ¼13½10 ¾ ¼1101½2 1 ¬ gkfly (Carry) 1100 ¼12½ 1101 ¼13½ 11001 ¼25½ mDr mnkgj.k esa vadks dks nk;ha vksj ls tksM+uk izkjEHk djsaA fu;ekuqlkj 0 vkSj 1 dks tksM+us ij ;ksx 1 izkIr gksrk gSA blh izdkj nwljs LFkku ds vadksa dk ;ksx 0] rhljs LFkku ds vadks dk ;ksx 0 o gkfly 1 izkIr gksrk gSA gkfly dks pkSFks LFkku ds vadks ds lkFk bls tksM+us ij vafre LFkku dk ;ksx 11 izkIr gksrk gS( ;g fu;ekuqlkj izkIr gksrk gSA vFkkZr 1$1$1 ¾ ¼1$1½$1 ¾ gkfly ¼1½ ;ksx ¼0½$1 ¾ gkfly ¼1½ ;ksx ¼0$1½ ¾ gkfly ¼1½ ;ksx ¼1½ mnkgj.k&2 153 $ 94 ¾ \ ¼153½10 1 0 0 1 1 001¬ ¼94½10 $ 0 1 0 1 1 11 0 ¬ ¼247½10 1 1 1 1 0 11 1 ¬ vr% 153$94 ¾ 247 100110012$010111102 ¾ 111101112 4 -6-2 _.kkRed la [ ;k, (Negative Numbers) n'keyo la[;k iz.kkyh esa _.kkRed la[;k dks blds /kukRed eku (positive Value) ds vkxs ^&* dk fpà yxkdj O;Dr fd;k tkrk gSA tSls 25 /kukRed la[;k dh&25 _.kkRed la[;k gksxhA ysfdu dEI;wVj esa _.kkRed la[;k dks O;Dr djus ds fy;s fuEufyf[kr rhu iz.kkfy;ksa dk mi;ksx fd;k tkrk gS& 1- fpà eku iz.kkyh (Signed Magnitude Method) 2- 1 dh iwjd iz.kkyh (One’s Complement Method) 3- 2 dh iwjd iz.kkyh (Two’s Complement Method) dEI;wVj foKku /61 4-6-2-1 fpà eku iz.kkyh (Signed Magnitude Method) bl iz.kkyh esa _.kkRed la[;k dks muds /kukRed eku ds vkxs ^&* dk fpà yxkdj fd;k tkrk gSA blh izdkj /kukRed la[;k dks ^$* dk fpà yxkdj fu:i.k fd;k tkrk gSA bl iz.kkyh esa ck;ha vksj ls igyh fcV la[;k ds fpà dks n'kkZrh gSA ;fn ;g fcV 0 gS rks la[;k /kukRed] ;fn 1 gS rks la[;k _.kkRed gksxhA mnkgj.kkFkZ la[;k 12 dk f}vk/kkjh lerqY; 1100 gSA ;fn ge bl iz.kkyh ds vuqlkj $12 dks fu:i.k djuk pkgs rks bl eku ds vkxs 0 yxk nsaxs] tSls 01100 vkSj &12 dk fu:i.k eku ds vkxs 1 yxkdj fd;k tkrk gSA tSls 11100] ijUrq bl iz.kkyh dk iz;ksx vc ugha fd;k tkrk gSA 4-6-2-2 1's iwjd iz. kkyh (One’s Complement Method) ;g iwjd iz.kkyh f}vk/kkjh ds vykok vU; fdlh Hkh la[;k iz.kkyh ij ykxw dh tk ldrh gSA blesa ge f}vk/kkjh la[;k ds izR;sd vad dks vf/kdre eku okys vad ¼tSls 1½ esa ls ?kVkdj ml la[;k dk 1's iwjd izkIr djrs gSaA D;ksafd f}vk/kkjh iz.kkyh esa flQZ nks vad gksrs gSa] blfy;s& 1 & 1 ¾ 0 ¼0 dk 1's iwjd 1 gS½ 0 & 1 ¾ 1 ¼1 dk 1's iwjd 0 gS½ vr% ge dg ldrs gSa fd 1 ds LFkku ij 0 vkSj 0 ds LFkku ij 1 fy[kus ij fdlh Hkh f}vk/kkjh la[;k dk 1's iwjd izkIr fd;k tk ldrk gSA 1's iwjd iz.kkyh esa /kukRed la[;kvksa dks buds eku }kjk o _.kkRed la[;kvksa dks 1's iwjd iz.kkyh ls O;Dr fd;k tkrk gSA mnkgj.k&1 ¼10001110½2 dk 1's iwjd fudkyus ds fy;s 1 ds LFkku ij 0 o 0 ds LFkku ij 1 fy[kus ls izkIr fd;k tk ldrk gSA vr% ¼10001110½2 01110001 1's iwjd (One's Complement) mnkgj.k&2 ,d 8 fcV dEI;wVj esa &12 dk 1's iwjd iz.kkyh esa fdl izdkj fu:i.k fd;k tk;sxk\ gy% 8 fcV esa 12 dk f}vk/kkjh lerqY; 00001100 gSA vr% &12 dks O;Dr djus ds fy;s mDr f}vk/kkjh la[;k dk 1's iwjd Kkr djuk gksxk tks fd 11110011 gksxkA mnkgj.k&3 ¼12½10 dk 9's iwjd (9's Complement) D;k gksxk\ gy% ¼12½10 87 9's iwjd (9's Complement) 9's iwjd Kkr djus ds fy;s la[;k ds izR;sd vad dks n'keyo iz.kkyh ds vf/kdre vad 9 ls ?kVk;k tkrk gSA vFkkZr 99&12¾87 4-6-2-3 2's iwjd rjhdk (Two’s Complement Method) fdlh Hkh la[;k dk 2's iwjd ml la[;k ds 1's iwjd esa 1 tksM+us ij izkIr gksrk gS( vFkkZr& 2’s Complement = 1’s Complement + 1 2's iwjd ¾ 1's iwjd $ 1 mnkgj.k&1 la[;k &19 dk 2's iwjd ¼2’s Complement) fyf[k,A dEI;wVj foKku /62 ¼19½10 dh f}vk/kkjh la[;k gSA ¾ ¼10011½2 ¼10011½2 dk 2's iwjd gksxk ¾ 01100$1 ¾ 01101 4-7 f}vk/kkjh ?kVko (Binary Subtraction) f}vk/kkjh ?kVko n'keyo ?kVko ls fHkUu gksrk gSA blds fuEu fu;e gSaA 1- 0 & 0 ¾ 0 2- 1 & 0 ¾ 1 3- 1 & 1 ¾ 0 4- ;fn 0 esa ls 1 dks ?kVkuk gks rks 0 dh ck;ha vksj ls tks Hkh igyh 1 fcV feysxh] ogka ls 1 dks LFkkukUrfjr fd;k tk;sxk ftlls fd 0 dk eku vc 10 gks tk;sxk vkSj ftl LFkku ls bls LFkkukUrfjr fd;k x;k gS ogkaa ij 1 ds LFkku ij 0 gks tk;sxkA vc ;fn 10 esa ls 1 dks ?kVk;k tk;sxk rks 1 çkIr gksxkA mnkgj.k&1 ¼1101½2 & ¼0100½2 1 1 0 1 ¼13½ &0 1 0 0 ¼4½ 1 0 0 1 ¼9½ mnkgj.k&2 ¼1110½2 & ¼1001½2 1 1 1 0 ¼14½ &1 0 0 1 ¼9½ 0 1 0 1 ¼5½ igys LFkku ij 10 esa ls 1 ?kVkus ij 1 izkIr gksxkA nwljs LFkku ij 0 esa ls 0 ?kVkus ij 0 izkIr gksxkA rhljs LFkku ij 1 esa ls 0 ?kVkus ij 1 izkIr gksxkA pkSFks LFkku ij 1 esa ls 1 ?kVkus ij 0 izkIr gksxkA mnkgj.k&2 ¼10011½2 & ¼10101½2 10011 & 10101 01110 igys o nwljs LFkku ij ?kVko fu;e ¼3½ o ¼2½ ls izkIr fd;k tk ldrk gSA rhljs LFkku 0 ls 1 ?kVkus ds fy;s ik¡posa LFkku ls igys pkSFks LFkku ij LFkkukUrfjr djuk gksxk ftlls ik¡pos LFkku ij 0 vkSj pkSFks LFkku ij 10 gks tkrk gSA vc pkSFks LFkku ls rhljs LFkku ij 1 LFkkukUrfjr fd;k tk;sxk] ftlls fd pkSFks LFkku ij vc 1 vkSj rhljs LFkku ij 10 gks tk;sxkA rhljs LFkku ij 10 esa ls 1 ?kVkus ij 1 izkIr gksxkA pkSFks LFkku ij 1 esa ls 0 ?kVkus ij 1 izkIr gksxkA vkSj ikaposa LFkku ij fQj 0 esa ls 1 ?kVkus dh izfØ;k viukuh gksxhA bl izfØ;k dh mi;ksfxrk dkxt dye rd lhfer gSA bldk mi;ksx dEI;wVj esa ugha fd;k tkrk gSA dEI;wVj foKku /63 4-7-1 1's iwjd ds iz;ksx ls ?kVko (Subtraction Using One’s Complement) bl iz.kkyh esa nks la[;kvksa dks ?kVkus ds fy;s f}vk/kkjh ?kVko iz.kkyh ugha viuk;h tkrh gS cfYd f}vk/kkjh ;ksx ls la[;kvksa dks ?kVk;k tkrk gSA 1's iwjd ds iz;ksx ls ?kVko ds fuEu fu;e gSaA (i) ftl la[;k dks ?kVkuk gS] mldk 1's iwjd (1's complement) Kkr djsAa (ii) bl 1's iwjd dks igyh la[;k ds lkFk tksM+ djsaA (iii) ;fn gkfly 1 gS rks bls ;ksx ds lkFk tksM+ nsaA mnkgj.k&1 1001 esa ls 0100 dks 1's iwjd iz.kkyh ls ?kVkb;sA 1001 ¼9½ izFke la[;k & 0100 ¼4½ f}rh; la[;k pj.k&1% f}rh; la[;k dk 1's iwjd Kkr djsaA 0100 dk 1's iwjd ¼1011½ gSA pj.k&2% izFke la[;k ds lkFk f}rh; la[;k dk 1's iwjd tksMsaA+ 1001 izFke la[;k $ 1011 f}rh; la[;k dk 1's iwjd gkfly 1 0100 pj.k&3 % gkfly 1 dks 'ks"k cps ;ksx ds lkFk tksM+ nsaA 0100 $ 1 0101 ¼5½ ;gh 9&4 ¾ 5 dk f}vk/kkjh 0101 lerqY; gSA mnkgj.k&2 ,d 8 fcV dEI;wVj esa 65 esa ls 33 dks 1's iwjd iz.kkyh ls ?kVkb;sA gy% pj.k&1 % 0010 0001 dk 1's iwjd 1101 1110 gS( pj.k&2 % 01000001 ¼65½ $ 11011110 ¼33 dk 1's iwjd½ 00011111 gkfly 1 pj.k&3 % 00011111 'ks"k cpk ;ksx $ 1 gkfly 00100000 ¼32½ vr% 65 & 33 ¾ 32 dk f}vk/kkjh lerqY; 00100000 gSA mnkgj.k&3 ,d 4 fcV dEI;wVj esa 5 esa ls 10 dks 1's iwjd iz.kkyh ls ?kVkb;sA 5&10 ¾ \ ¼0101½2 izFke la[;k ¼5½10 ¾ ¼1010½2 f}rh; la[;k ¼10½10 ¾ 0101 izFke la[;k dEI;wVj foKku /64 $ 0101 f}rh; la[;k dk 1's iwjd ;ksx 1010 bl tksM+ esa gkfly 0 gS] ftldk vFkZ&;g gS fd tks ;ksx izkIr gqvk gS og _.kkRed la[;k gS vkSj mls 1's iwjd ls fu:fir fd;k x;k gSA vr% izkIr ;ksx dk okfil 1's iwjd izkIr dj ^&* ds fpà lkFk fy[kus ij lgh mÙkj izkIr gksxkA 1010 dk 1's iwjd gksxk& 0101 vr% lgh mÙkj gksxk&0101 tks fd &5 ds lerqY; gSA 4-7-2 2's iwjd ds iz;ksx ls ?kVko (Subtraction Using Two’s Complement) 1's iwjd ?kVko vkSj 2's iwjd ?kVko esa vUrj flQZ bruk lk gS fd igyh la[;k esa nwljh la[;k dk 2's iwjd tksMk+ tkrk gS vkSj izkIr gkfly dks NksM+ fn;k tkrk gSA blds fu;e fuEu gSAa (i) ftl la[;k dks ?kVkuk gks mldk 2's iwjd Kkr djsaA (ii) 2's iwjd dks igyh la[;k ds lkFk tksMas+A (iii) ;ksx ls izkIr gkfly dks [kkfjt dj nsaA mnkgj.k&1% ,d 4 fcV dEI;wVj esa 15 esa ls 9] 2's iwjd iz.kkyh ls ?kVkb;sA 1111 ¼15½ & 1001 ¼9½ 0110 ¼6½ pj.k&1 % nwljh la[;k dk 2's iwjd Kkr djsa vFkkZr 1001 dk 2's iwjd gksxk 0111 pj.k&2 % 9 ds 2's iwjd dks 15 ds lkFk tksM+ nssaA 1111 ¼15½ $ 0111 ¼9 dk 2's iwjd½ gkfly 1 0110 pj.k&3 % gkfly 1 dks NksM+ nsa] rks 0110 gh 6 dk f}vk/kkjh lerqY; gksxkA mnkgj.k&2% ,d 8 fcV dEI;wVj esa 65 esa ls 33 dks 2's iwjd iz.kkyh ls ?kVkb;sA 0100 0001 ¼65½ & 0010 0001 ¼33½ ¼32½ pj.k&1 % 33 dk 2's iwjd 11011111 gSA pj.k&2 % 0100 0001 ¼65½ $ 1101 1111 ¼33 dk 2's iwjd½ gkfly 1 0010 0000 pj.k&3 % gkfly dks NksM+ nsa ;ksx 00100000 gh 32 dk f}vk/kkjh lerqY; gSA mnkgj.k&3% ,d 8 fcV dEI;wVj esa 11 esa ls 23 dks 2's iwjd iz.kkyh ls ?kVkb;sA 0000 1011 ¼11½ & 0001 0111 ¼23½ ¼&12½ pj.k&1 % 23 dk 2's iwjd 1110 1001 gSA dEI;wVj foKku /65 pj.k&2 % 11 dks 23 ds 2's iwjd ls tksM+ nsAa 0000 1011 $ 1110 1001 1111 0100 pj.k&3 % gkfly 0 gksuk ;g crkrk gS fd ?kVko dk mÙkj _.kkRed gS vkSj eku ?kVko ds _.kkRed mÙkj dk 2's iwjd gSA vr% mÙkj fy[kus ds fy;s izkIr ;ksx dk ,d ckj fQj 2's iwjd Kkr dj ^&* ds fpà ls fy[ksaA vFkkZr~ 1111 0100 dk 2's iwjd gS 0000 1100] vr% mÙkj gksxk &0001100- 4-8 f}vk/kkjh xq.kk (Binary Multiplication) f}vk/kkjh ldrk gSA 0*0¾ 0*1¾ 1*0¾ 1*1¾ mnkgj.k&1 xq.kk n'keyo xq.kk ls dkQh ljy gS o fuEu fu;eksa dh enn ls xq.kk fd;k tk 0 0 0 1 1 × 1 10 0 1 0 1 0 0 0 1 1 1 0 1 0 0 0 0 0 × 0 1 1 1 × 1 dEI;wVj izk;% bl rjg ls xq.kk ugha djrk gS] tksM+ dh lgk;rk ls gh nks la[;kvksa dks xq.kk fd;k tkrk gSA bls le>us ds fy;s ge fuEu mnkgj.k ysrs gSaA tSls 4*5 djus ds fy;s 4 dks ik¡p ckj tksM+uk pkfg;s] 4$4$4$4$4 ;k 5 dks pkj ckj tksM+uk pkfg;s] tSls 5$5$5$5A ;g izfØ;k dEI;wVj esas T;knk vuqdy w gSA 4-9 f}vk/kkjh Hkkx (Binary Division) f}vk/kkjh Hkkx ds fuEu fu;e gSaA 0@1 ¾ 0 1@1 ¾ 1 f}vk/kkjh Hkkx djus dh izfdz;k n'keyo Hkkx izfØ;k ds leku gSA blds fuEu pj.k gSAa 1- HkkT; (dividend) ds ck;ha rjQ ls izkjEHk djsaxsA 2- Hkktd (divisor) dks HkkT; (dividend) ls Øeokj ?kVkrs tk;saA 3- ;fn ?kVko lEHko gS rks HkkxQy (quotient) esa 1 fy[ksAa 4- ;fn ?kVko lEHko ugha gS rks Hkktd (divisor) 'ks"kQy (remainder) ls cM+k gS rks HkkxQy (remainder) esa 0 fy[ksAa dEI;wVj foKku /66 5- HkkT; dh vxyh fcV dks 'ks"kQy ds lkFk fy[ksa vkSj ;g izfØ;k rc rd nksgjk;sa tc rd HkkT; esa dksbZ fcV uk cpsA 101101»110 mnkgj.k&1 110 101101 0111 ¬ HkkxQy 110 1011 & 110 1010 &110 1001 &110 011 ¬ 'ks"kQy dEI;wVj esa Hkkx dh ;g izfØ;k ugha viuk;h tkrh gSA dEI;wVj nks la[;kvksa dk Hkkx djus ds fy;s ?kVko dh izfØ;k dk nksgjko djrk gSA tSls 40»8 Kkr djus ds fy;s 8 dks 40 esa ls ?kVkrs tk;sx as s tc rd fd 0 ;k mlls de la[;k izkIr ugha gksrh gSA dqy ftruh ckj Hkktd dks HkkT; ls iw.kZ :i ls ?kVk;k x;k] og HkkxQy gksrk gSA 40&8 ¾ 32 32&8 ¾ 24 24&8 ¾ 16 16&8 ¾8 8&8 ¾0 mijksDr mnkgj.kksa esa Hkktd ¼8½ dks HkkT; ¼40½ esa ls 5 ckj ?kVk;k x;kA vr% HkkxQy 5 gksxk o 'ks"kQy 0 gksxkA 4-10 dksM iz.kkyh (Coding System) f}vk/kkjh la[;k iz.kkyh }kjk la[;kvksa dks flQZ 0 o 1 ds :i esa fy[kk tkrk gSA la[;kvksa ds vfrfjDr vaxzsth o.kZekyk ds 26 cM+s o 26 NksVs v{kj] 10 vad ¼ 0 ls 9 ½ o vU; fo'ks"k fpàksa dks Hkh dEI;wVj esa ckbujh :i esa laxzg fd;k tkrk gSA bl dk;Z ds fy;s o.kZekyk ds v{kjksa] vadksa o fo'ks"k fpàksa dks fof'k"B ckbujh dksM (Code) iznku fd;s tkrs gSaA tSls BCD, ASCII ;k EBCDIC izeq[k dksM iz.kkfy;k¡ gSaA ckbujh esa fofHkUu la[;kvksa dks O;Dr djus ds fy;s de ls de n fcV~l ¼2n½ dh vko';drk gksrh gSA mnkgj.k ds fy;s 4 fHkUu la[;kvksa dks 2&fcV dksM ls O;Dr fd;k tk ldrk gS] ftlesa izR;sd la[;k dks fuEu fcV la;kstu ls fu:fir fd;k tk ldrk gS& 00] 01] 10] 11- blh izdkj vkB la[;kvksa dks 3&fcV dksM ls fu:fir fd;k tk ldrk gS&000] 001] 0101] 011] 100] 101] 110 o 111ckbujh dksM nks Ádkj ds gksrs gSa& 1eku;qDr dksM (Weigthted Code) og dksM ftlds vUnj izR;sd fcV dk LFkku ds fglkc ls] mudk fuf'pr eku gksrk gS] og dksM eku;qDr dgykrk gSA mnkgj.kr;k& BCD dksMA dEI;wVj foKku /67 2- eku jfgr dksM (Unweighted Code) bl dksM esa izR;sd fcV dk vius LFkku ds fglkc ls fuf'pr eku ugha gksrk gSA tSls ASCII ;k EBCDIC dksMA 4-10-1 ckbujh dksMsM Mslhey (BCD-Binary Coded Decimal) BCD dksM lcls izFke iqjkuk dksM gSA bl dksM iz.kkyh esa izR;sd vad dks ckbujh dksM esa cnyk tkrk gSA izR;sd n'keyo vad dk BCD dksM fuEu lkj.kh esa n'kkZ;k x;k gSA n'keyo vad BCD dksM 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 izR;sd n'keyo vad dks 4 fcV ds lewg dh ckbujh la[;k essa iznf'kZr fd;k tkrk gSA 4 fcV ds 16 lewg curs gSa] ftlesa ls dsoy izFke 10 dk gh mi;ksx BCD esa fd;k tkrk gSA 'ks"k 6 lewg ¼1010] 1011] 1100] 1101] 1110 ,oa 1111½ BCD esa iz;ksx ugha fd;s tkrs gSaA mnkgj.k 1& n'keyo la[;k 527 dks BCD dksM esa cnfy;sA 5 2 7 ¯ ¯ ¯ 0101 0010 0111 ;k 010100100111 BCD dksM gSA BCD dksM eku;qDr dksM gS] vFkkZr fcV dk LFkku ds fglkc ls fuf'pr eku gSA BCD Code dbZ izdkj ds gSaA tSls 8421 dksM] 7421 dksM] 6311 dksM] 2421 dksM] 8421 dksM bR;kfnA buesa 8421 dksM eq[;r% izpfyr gSA lkj.kh&1 ds }kjk 8421 dksM dks n'kkZ;k x;k gSA bl dksM esa 8] 4] 2] 1 fcV ds LFkkuksa ds eku gSaA vFkkZr~ BCD dksM 0110 dks ;fn vadks ds eku ds fglkc ls ns[kk tk;s& 0 × 8 $ 1×4 $ 1×2 $ 0×1 ¾ 6 rks ;g n'keyo la[;k 6 dk 8421 (BCD) dksM gSA dEI;wVj fMtkbuj BCD dksM esa 6 fcV~l dk Hkh iz;ksx djrs gSa] buesa izFke nks fcV] tksu fcV (Zone Bit) dgykrh gS rFkk vfUre pkj fMftV fcV (Digit Bit) dgykrh gSA fMftV fcV BCD ekuksa dks gh O;Dr djrh gSA 6 fcV ds bl dksM esa vf/kdre 64 lewg ¼dksM½ cuk;s tk ldrs gSaA lkj.kh&2 esa 6 fcV BCD dksM dks n'kkZ;k x;k gSA Character 0 BCD Code Zone Digit 00 0000 dEI;wVj foKku /68 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 00 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 01 01 01 01 01 01 01 01 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0010 0011 0100 0101 0110 0111 1000 1001 0001 0010 0011 0100 0101 0110 0111 1000 1001 0010 0011 0100 0101 0110 0111 1000 1001 lkj.kh & 2 BCD fcV dksM dEI;wVj foKku /69 4-10-2 vkLdh dksM (ASCII Code) ilZuy dEI;wVjksa esa MkVk dks fu:fir djus ds fy, ;g dksM lcls vf/kd izpfyr gSA bl dksfMax iz.kkyh dks ^^ vesfjdu LVS.MMZ dksM QWkj bUQkWjes'ku bUVjpst a ** (American Standard Code for Information Interchange) dgrs gSaA bl dksfMax i)fr esa vaxzsth o.kZekyk ds v{kjksa] la[;kvksa rFkk izrhdksa dks fu:fir fd;k tk ldrk gSA ;g dksM MkVk ds vkUrfjd fu:i.k o MkVk laizs"k.k esa iz;ksx fd;k tkrk gSA ASCII dksM nks izdkj ds gksrs gSa% ASCII-7 vkSj ASCII-8, ASCII-7 dksM 7 fcV dk dksM gS tcfd ASCII-8 ] 8 fcV dk dksM gSA ASCII-7 dksM esa ¼27½ vFkkZr~ 128 fHkUu la[;kvksa (Characters) dk fu:i.k fd;k tk ldrk gSA bl dksM ds igys rhu fcV tksu fcV (Zone bit) dgykrs gSa vkSj vfUre pkj fcV fMftV fcV (Digit bit) dgykrh gSA lkj.kh&3 ds }kjk ASCII-7 dksM dks n'kkZ;k x;k gSA Character 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S ASCII-7 Code Zone Digit 011 0000 011 0001 011 0010 011 0011 011 0100 011 0101 011 0110 011 0111 011 1000 011 1001 100 0001 100 0010 100 0011 100 0100 100 0101 100 0110 100 0111 100 1000 100 1001 100 1010 100 1011 100 1100 100 1101 100 1110 100 1111 101 0000 101 0001 101 0010 101 0011 Character ASCII-7 Code Zone Digit dEI;wVj foKku /70 T U V W X Y Z 101 101 101 101 101 101 101 0100 0101 0110 0111 1000 1001 1010 lkj.kh&3 ASCII-7 dksM mnkgj.k&1 APF dk 7-bit ASCII dksM fyf[k,A A&1000001 P&1010000 F&1000110 vr% APF ¾ 1000001 1010000 1000110 ASCII-8 8 fcV dk dksM gS o blls 256 ¼28½ fHkUu la[;kvksa (Characters) dk fu:i.k fd;k tk ldrk gSA bl dksM esa pkj tksu fcV gksrh gS o pkj fMftV fcV gksrh gSA fuEu lkj.kh ASCII-8 dksM dks n'kkZrh gSA Character 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R ASCII-8 Code Zone Digit 0101 0000 0101 0001 0101 0010 0101 0011 0101 0100 0101 0101 0101 0110 0101 0111 0101 1000 0101 1001 1010 0001 1010 0010 1010 0011 1010 0100 1010 0101 1010 0110 1010 0111 1010 1000 1010 1001 1010 0010 1010 0011 1010 1100 1010 1101 1010 1110 1010 1111 1011 0000 1011 0001 1011 0010 dEI;wVj foKku /71 S T U V W X Y Z 1011 1011 1011 1011 1011 1011 1011 1011 0011 0100 0101 0100 0111 1000 1001 1010 lkj.kh & 4 ASCII-8 fcV dksM mnkgj.k&2 SKY dk ASCII-8 dksM fyf[k,A S&1011 0011 K&1010 1011 Y&1011 1010 4-10-3 ,clsf Md dksM (EBCDIC Code) BCD dksM dsoy 64 ¼26½ fHkUu la[;kvksa dks gh dksM esa fu:fir dj ldrk gSA ;g vad ¼10½] vaxst z h ds NksVs v{kj] ¼26½] vaxst z h ds cM+s v{kj ¼26½ o fof'k"V fpàksa ¼28$½ dks fu:fir djus ds fy;s BCD ds 6&fcV dksM dks c<+k dj 8&fcV dj fn;k x;kA c<+k;s x;s 2 fcV~l] i;kZIr ugha gSA blfy;s vfrfjDr tksu (Zone) fcV~l gS]a tks vc c<+dj 4 fcV~l gks x;s gSAa bl dksM dks ^^,DlVsM a M s ckbujh dksMsM Mslhey bUVjpsat dksM** (Extended Binary Coded Decimal Interchange Code) dgrs gSaA bl dksM ls 256 ¼28½ fHkUu la[;k,sa (Characters) fu:fir dh tk ldrh gSAa D;ksafd EBCDIC. 8 fcV dksM gSa] bls 4&4 fcV ds lewgksa esa ckaVk tk ldrk gS ftUgsa ,d gSDlkMslhey fMftV (Hexadecimal digit) ls fu:fir fd;k tk ldrk gSA EBCDIC dksM lkj.kh la[;k 5 esa n'kkZ;k x;k gSA bl lkj.kh dks ns[kus ls irk pyrk gS fd lHkh Characters dh fMftV fcV (Digit bit) ogh gS tks fd BCD dksM esa gSA Character 0 1 2 3 4 5 6 7 8 9 A B C D E EBCDIC Code Zone Digit 1111 0000 1111 0001 1111 0010 1111 0011 1111 0100 1111 0101 1111 0110 1111 0111 1111 1000 1111 1001 1100 0001 1100 0010 1100 0011 1100 0100 1100 0101 Character EBCDIC Code Zone Digit dEI;wVj foKku /72 F G H I J K L M N O P Q R S T U V W X Y Z 1100 1100 1100 1100 1100 1100 1100 1100 1101 1101 1101 1101 1101 1101 1101 1101 1101 1101 1101 1101 1101 0110 0111 1000 1001 0001 0010 0011 0100 0101 0110 0111 1000 1001 0010 0011 0100 0101 0110 0111 1000 1001 lkj.kh & 5 EBCDIC fcV dksM mnkgj.k&1 ZONE dk EBCDIC dksM fyf[k,A Z&1110 1001 O&1101 0110 N&1101 0101 E&1100 0101 4-10-4 xzs dksM (Gray Code) fuEufyf[kr lkj.kh la[;k 6 esa 4&fcV xzs dksM ds lkFk mlds ckbujh lerqY; Hkh fn;s x;s gSAa lkj.kh ls Li"V irk pyrk gS fd xzs dksM la[;k vius ls igyh la[;k ls dsoy 1 fcV ls vyx gSA tSls n'keyo 7 vkSj 8 ds xsz dksM 0100 o 1100 esa dsoy pkSFks LFkku ij ,d fcV ¼1½ dk vUrj gSA blh izdkj n'keyo 10 vkSj 11 ds xzs dksM 1111 o 1110 esa dsoy igys LFkku ij dsoy fcV ¼1½ dk vUrj gSA xzs dksM fudkyus dh fof/k fuEu gSA 3 dk xzs dksM fudkyus ds fy;s mlls igys okys vad 2 ds xzs dksM ds vadksa dks nka;h ls cka;h vksj nks&nks fcV~l tksM+rs tkrs gSaA Decimal 0 1 2 3 Gray Code 0000 0001 0011 0010 Binary 0000 0001 0010 0011 dEI;wVj foKku /73 4 5 6 7 8 9 10 11 : : 0110 0111 0101 0100 1100 1101 1111 1110 : : 0100 0101 0110 0111 1000 1001 1010 1011 : : lkj.kh 6 & xzs dksM 4-10-5 ;wuhdksM (Uni Code) MkVk dks O;Dr djus ds fy;s ;g dksM loZ= lalkj esa ekuk tkrk gSA bls (Uni Code Worldwide Character Standard) ;wuhdksM oYMZokbM djSDVj LVs.MMZ dgrs gSaA ;g dksM 16 bits dk dksM gS blds }kjk v{kj] vad ;k dksbZ Hkh fpà dks O;Dr fd;k tk ldrk gSA bl dksM 16 bits ds }kjk 216 ¼65536½ fofHkUu v{kjksa ;k Árhdksa dks O;Dr fd;k tk ldrk gSA bl dksM dh lgk;rk ls fdlh Hkh ns'k dh Hkk"kk tSls tkikuh] phuh] dksfj;k] bR;kfn Hkk"kk ds v{kjksa dks O;Dr fd;k tk ldrk gSA ;g dksM ASCII dksM ls feyrk tqyrk gS] blds izFke 256 dksM ASCII-8 bit dksM tSls gSaA ;g ASCII-8 fcV dksM dk foLrkj gSA bl dksM dks 1991 esa Apple Computer Corporation ¼,iy dEI;wVj dkWjiksj's ku½ o Xerox Corporation us lkFk feydj rS;kj fd;k FkkA 1999 ds var rd bl dksM ds rhu fl)kUr cuk;s tk pqds gSaA ;wuhdksM fl)kUr ds rgr 57709 dksM cuk;s tk pqds gSaA 4-10-6 bLdh dksM ISCII (Indian Scripts Standard Code for Information Interchange Code) bl dksM dks C-DAC (Centre for development of Advanced Computing) lhMsd iq.ks }kjk cuk;k x;k gSA bl dksM dh lgk;rk ls Hkkjrh; Hkk"kkvksa ds v{kjksa dks O;Dr fd;k x;k gS tks fd cãh Hkk"kk ls fy;s x;s gSaA 1991 esa Hkkjrh; C;wjks vkWQ LVs.MMZl us bl dksM dks ekU;rk iznku dhA 1986&88 esa bysDVªksfud foHkkx ds rRoko/kku esa ,d lfefr cukbZ xbZ vkSj lh&MSd (C-DAC) bldk lnL; cuk ftlus bl dksM dks cuk;kA egÙoiw . kZ fcUnq & 1fdlh Hkh vad iz.kkyh dk vk/kkj (Radix or Base) ml iz.kkyh esa dqy vadksa ;k izrhdksa dks crkrk gSA 2f}vk/kkjh iz.kkyh esa 1$1¾10 gksrk gS] vk/kkj dks O;Dr djus ds fy;s lcfLØIV dk bLrseky dEI;wVj foKku /74 fd;k tkrk gSA vr% 12$12¾102 fy[kk tkrk gSA 3f}vk/kkjh la[;k dks n'keyo dh la[;k esa cnyus ds fy;s izR;sd fcV dks mlds LFkku ds Hkkj (Weight) ¼1] 2] 4] 8]---½ ds lkFk tksMk+ tkrk gSA ysfdu /;ku j[ksa] tks fcV 1 gS mlds Hkkj dks gh tksM+k tkrk gSA 4f}vk/kkjh ;ksx ds fu;e 0$0¾0] 0$1¾1] vkSj 1$1¾0 o gkfly 1 gSA 51's iwjd fudkyus ds fy;s 0 ds LFkku ij 1 vkSj 1 ds LFkku ij 0 fy[kuk pkfg;sA 62's iwjd fudkyus ds fy;s 1's iwjd esa 1 tksfM+;sA 71'siwjd ?kVko fudkyus ds fy;s izFke la[;k dks nwljh la[;k ds 1's iwjd ds lkFk tksM+rs gSaA ;fn gkfly 1 izkIr gks rks gkfly dks ;ksx ds lkFk tksM+rs gSaA 82's iwjd ?kVko fudkyus ds fy;s izFke la[;k dks nwljh la[;k ds 2's iwjd ds lkFk tksMr + s gSaA ;fn tksM+ ds ckn gkfly 1 izkIr gks rks mls NksM+ fn;k tkrk gSA 9f}vk/kkjh ?kVko ds fu;e % 0&0¾0] 1&0¾1] 1&1¾0 vkSj 0&1¾1 o Borrow ¾ 1 10- f}vk/kkjh xq.kk ds fu;e% 0*0¾0] 0*1¾0] 1*0¾0 vkSj 1*1¾1 11- f}vk/kkjh Hkkx ds fu;e% 0»1¾0] 1»1¾1 12- BCD dksM eku;qDr dksM gS] tks 4 fcV ;k 6 fcV dk gksrk gSA 13- ASCII dksM 7 o 8 fcV dk gksrk gSA 14- EBCDIC dksM 8 fcV dk gksrk gSA vH;kl iz'u& 1- f}vk/kkjh vad iz.kkyh esa vk/kkj gksrk gS& ¼v½ 1 ¼c½ 2 ¼l½ 3 ¼n½ 0 2- vkWDVy vad iz.kkyh esa vf/kdre vad gksrs gSa& ¼v½ 5 ¼c½ 4 ¼l½ 8 ¼n½ 7 3- gSDlkMslhey vad iz.kkyh esa vk/kkj gksrk gS& ¼v½ 10 ¼c½ 12 ¼l½ 16 ¼n½ 15 4- f}vk/kkjh ;ksx esa gkfly 1 gksrk gS] tc& ¼v½ 0$0 ¼c½ 0$1 ¼l½ 1$0 ¼n½ 1$1 5- f}vk/kkjh ?kVko esa 10&1 gS& ¼v½ 0 ¼c½ 1 ¼l½ 11 ¼n½ mijksDr esa ls dksbZ ugha 6- ASCII dksM esa fuEu dks n'kkZ;k tk ldrk gS& ¼v½ vad ¼c½ vaxzsth v{kj ¼l½ fof'k"V fpà ¼n½ mi;qZDr lHkh dEI;wVj foKku /75 7- BCD dksM fuEu gS& ¼v½ 84&2&1 ¼c½ 7421 ¼l½ 3421 ¼n½ 8421 8- EBCDIC dksM fdrus fcV dk gS& ¼v½ 7 ¼c½ 2 ¼l½ 1 ¼n½ 8 9- Unicode dksM fdrus fcV dk gS& ¼v½ 15 ¼c½ 14 ¼l½ 12 ¼n½ 16 vfry?kq Ù kjkRed iz ' u 1- 2$2¾4 ds fy;s f}vk/kkjh vad iz.kkyh ds }kjk lehdj.k fyf[k;sA 2- 10] 110] 111] 1011] 1100 o 1110 f}vk/kkjh vadksa ds lerqY; n'keyo vad fyf[k;sA 3- 23-45 n'keyo vad ds lerqY; f}vk/kkjh la[;k D;k gksxh\ 4- f}vk/kkjh ?kVko ds fu;e fy[ksaA 5- 1's iwjd fudkyus dh fof/k fy[ksaA 6- ?kVko fudkyus dh dkSu&dkSu lh fof/k;k¡ gSa\ 7- ASCII&7 vkSj EBCDIC&8 dksM esa D;k varj gS\ 8- Unicode T;knk mi;ksx esa D;ksa fy;k tkrk gS\ 9- xzs dksM D;k gS\ y?kq Ù kjkRed iz ' u& 1- 2's iwjd fudkyus dh fof/k le>kb;sA 2- 1's iwjd ?kVko dh fof/k le>kb;sA 3- 2's iwjd ?kVko esa vafre LFkku ij gkfly 1 vkus ij mldk D;k fd;k tkrk gS\ vkSj tc ;g 1's iwjd ?kVko essa izkIr gksrh gS rc bldk D;k fd;k tkrk gS\ 4- dEI;wVj esa dksM dh D;k mi;ksfxrk gS\ 5- fdlh Hkh vad iz.kkyh esa mlds vk/kkj dk D;k egÙo gS\ fucU/kkRed iz' u& 1- f}vk/kkjh (Binary) Hkkx dks mnkgj.k lfgr le>kb;sA 2- ?kVko dh fofHkUu fof/k;ksa dks mnkgj.k lfgr le>kb;sA 3- fuEufyf[kr f}vk/kkjh la[;k dks n'keyo la[;k esa ifjofrZr dfj;sA ¼v½ 00111 ¼c½ 11001 ¼l½ 1010-001 ¼n½ 111-11 4- fuEufyf[kr gSsDlkMslhey la[;kvksa dks f}vk/kkjh la[;k esa cnfy;sA ¼v½ FF ¼c½ ABC ¼l½ CD42 ¼n½ F329 5- fuEufyf[kr f}vk/kkjh la[;kvksa dks muds lerqY; gSsDlkMslhey esa cnfy;sA ¼v½ 1110 1000 ¼c½ 1010 1111 0110 ¼l½ 1100 1011 ¼n½ 1000 1011 1101 0110 6- 101110 dk 2's iwjd fyf[k,A dEI;wVj foKku /76 789101112- 101111 vkSj 11000 1 dk ;ksx dhft,A 0111 0011 vkSj 1011 1011 dk ;ksx dhft,A 11101 dks 100011 esa ls 2's iwjd ?kVko fof/k ls ?kVko dhft,A 1100 1111 dks 10111 ls xq.kk dhft,A 110011 » 101 ¾ \ 10001100 » 1100 ¾ \ mÙkjekyk 1 ¼c½ 2 ¼l½ 3 ¼l½ 4 ¼n½ 5 ¼c½ 6 ¼n½ 7 ¼n½ 8 ¼n½ 9 ¼n½ dEI;wVj foKku /77 1 izksxzkfeax esFksMksyksth (Programming Methodlogy) 1-1 ,YxksfjFke (Algorithm) fdlh izksxzke ds gy dks vyx&vyx LVsi ds vanj fn[kkus dks ,YxksfjFke dgrs gSA tc ge fdlh ,YxksfjFke dk iz;ksx djsaxs rks ;g lqfuf'pr djsaxs fd gj vkWijs'ku fuf'pr le; rd fu"ikfnr gksA ;kfu ftruh ckj Hkh LVsi fu"ikfnr (Execute) gks og ,d fuf'pr la[;k rd gksA rFkk gj LVsi izHkkodkjh (Effective) gksA 1-2 ,YxksfjFke dk cukuk (Develop an Algorithm) ,YxksfjFke cukus ds fy, tks Hkh izksxzke fn;k x;k gS mldk <ax ls v/;;u djuk pkfg;sA izkx s kz ej dks tks Hkh izkx s kz e cukuk gSA mldks <ax ls le>dj fQj ml izkx s kz e dk rjhdk o rdZ fudkys ftlls fd ml izksxzke dk gy fudky ldsA rdZ ges'kk lh/kk vkSj le>us okyk gksuk pkfg;sA lk/kkj.kr;k ,YxksfjFke cukrs le; fuEu ckrksa dk /;ku j[kuk pkfg;sA 1lcls igys fn;s gq, iz'u dks le>asA 2fQj iz'u dk mRrj (Output) le>us dk iz;Ru djuk pkfg;sA 3fQj iz'u ds fy, tks Hkh buiqV (Input) dh t:jr gSA ftlls fd mRrj lgh <ax ls vk tk;s] irk djuk pkfg;sA 4fQj tks Hkh rdZ vkSj gy fudkyk gSA mldk uD'kk cukuk pkfg;s ftlls og iz'u dk lgh mRrj vk tk;sA 5,YxksfjFke dks buiqV MkVk nsdj tkap djuh pkfg;sA 6LVsi 1 ls 5 rc rd nksgjk;s tc rd fd ,YxksfjFke }kjk lgh mRrj ugha vk tk;sA tgka Hkh ge ,YxksfjFke esa fy[ks x = x + 5 rks bldk eryc gS fd x dk u;k eku = x dk iqjkuk eku $ 5 vFkkZr x dk iqjkuk eku bl dFku dks fu"ikfnr djus ds ckn [kRe gks x;k gSA vkSj mldh txg x ds u;s eku us ys yh gSA dEI;wVj foKku /78 mnkgj.k %& fdlh Hkh uacj dk QsDVksfj;y fudkyus dk ,YxksfFkze fy[kksA 1 2 3 Read n F 1 1 I 4 5 6 7 5 ls 6 rd ykbu dks nksgjk;s tc rd I<=n gks F F*I I+1 I Print F 1- ,d ,YxksfjFke cukb;s tks fd izFke n izk—r la[;kvksa ds oxZ dk tksM+ fudkysA Step 1. Read n Step 2. Sum 0 Step 3. Set i 1 Step 4. if i<=n Step 5. Sum Sum+i*i Step 6. Set i i+1 Step 7. go to step 4 Step 8. Write sum mnkgj.k 2- ,d ,YxksfjFke cukb;s tks fd izFke n la[;kvksa ds le rFk fo"ke la[;kvksa dk tksM+ fudkysA Step 1. Read n Step 2. Step 3. Step 4. Step 5. Step 6. Step 7. Step 8. Se 0 0, i 1 So if i<=n Se+i if (i%2=0) Se else so so+i i+1 set i Go to step 4 Step 9. Print Se, So 1-3 ekWM~;wyj izLrko (Modular Approach) ekWM;~ y w j dk eryc gksrk gS NksVk izkx s kz eA ekWM;~ y w j izLrko ,d izdkj dh rduhd gSA ftlesa ;fn dksbZ izkx s kz e dfBu yxrk gS rks] mldks vyx&vyx nks izkx s kz e esa ck¡V nsrs gSA vc bu vyx&vyx izkx s kz eksa dks vyx&vyx dEI;wVj esa ju djrs gaAS vkSj budh dfe;ksa (Error) dks nwj djrs gSaA bl izdkj bl rduhd dks LVªDpMZ izksxzkfeax (Structured Programming) Hkh dgrs gSA D;ksafd blesa gj dfBu izkx s zke dks vyx&vyx ckWV nsrs gaSA vyx&vyx izksxzke esa tkus (Entry) dEI;wVj foKku /79 dk vkSj ckgj fudkyus (Exit) dk dsoy ,d gh jkLrk gksrk gSA (i) Åij ls uhps izLrko (Top down approach) bl izLrko esa cM+s izksxkz e dks NksVs&NksVs izksxkz e esa ckaV nsaxAs izksxkz e lcls igys eq[; izksxkz e ls izkjaHk gksxkA tks fd uhps vkrs vkrs NksVs NksVs izkx s zkeksa esa caVrk tk;sxkA vc gj NksVs izkx s zkeksa dks ge vyx&vyx ls lqfo/kkiwoZd gy dj ldrs gSA ekM;wy 1 ekM;wy 2 ekM;wy 4 ekM;wy 5 ekM;wy 3 ekM;wy 6 ekM;wy 7 lk/kkj.kr;k tc Hkh dksbZ izksxzke cukrs gS rks blh rduhd dk iz;ksx djrs gSA mnkgj.k ds fy, ;fn gesa dksbZ cM+s edku dk fuekZ.k djrs gS rks ge viuh lqfo/kkuqlkj igys lHkh dejksa dk fuekZ.k dk;Z djk;saxs tks fd bZV o lhesUV ls gksxk] mlds ckn ge lkjk yksgs dk dke djk;saxsA mlds ckn ydM+h dk dke djk;saxAs dgus dk eryc gS fd ge dHkh Hkh ;g ugha djk;saxs fd ge ,d dejk cuk;saxs vkSj mlesa igys pqukbZ dk dke] fQj ydM+h dk dke] fQj yksgs dk dke djk;saxsA vkSj mlds ckn fQj nwljs dejs dk dke Hkh blh rjg djk;saxsA 1-4 izys[ku (Documentation) izy[s ku fdlh Hkh leL;k ds MkVk dk lewg o mlds gy dks lqO;ofLFkr rjhds ls dkxt ij n'kkZus dks dgrs gSA izy[s ku ds varxZr ;g Hkh crkuk iM+rk gS fd ;g leL;k (problem) fdlus fy[kh] dc fy[kh vkSj D;ksa fy[khA bl leL;k ds vanj dkSu&dkSuls QaD'ku dk iz;ksx fd;k x;k gSA fdlh Hkh lkW¶Vos;j ds izys[ku esa fuEufyf[kr phtsa t:j gksuh pkfg;sA 1-4-1 lkW¶Vos;j dks ifjHkkf"kr djuk %& izys[ku dks ifjHkkf"kr djrs le; ge ;g t:j crk;s fd lkW¶Vos;j fdl pht dk gSA rFkk fdlds }kjk cuk;k x;k gSA vkSj fdl dke ds fy, cuk;k x;k gSA 1-4-2 lkW¶Vos;j dks o.kZu djuk (Description of the program) %& lkW¶Vos;j dk o.kZu djus ds fy, ¶ykspkVZ] ,YxksfjFke] tkWp ds fy, MkVk tks iz;ksx esa fy,] tkWp ds ckn tks ifj.kke vk;s vkfn lc phtksa dk izys[ku ds vUrxZr lekos'k gksuk pkfg;sA 1-4-3 fudk; ds ckjs esa o.kZu (Description of the system) izys[ku ds vUrxZr gedks ;g Hkh crkuk gS fd ;g lkW¶Vos;j fdl fudk; ;k mi fudk; okrkoj.k esa vPNh rjg dke djrk gSA ml fudk; dk iwjh rjg o.kZu djuk gSA vxj fudk; T;knk dEI;wVj foKku /80 cM+k gS rks laf{kIr ykbuksa esa ml fudk; dk o.kZu djuk gSA fdl rjg ds buiqV MkVk izksxkz e ds vanj iz;ksx esa fy;s x;s gSA rFkk fdl rjg dk vkmViqV izksxzke }kjk feysxk vkfn lc dFkuksa dk Li"V o.kZu gksuk pkfg;sA 1-4-4 vkWijsVj funsZ'k iqfLrdk (An operator instruction manual) lkW¶Vos;j iSdt s ds vanj vkWijsVj funsZ'k iqfLrdk gksuh pkfg,A vkWijsVj funsZ'k iqfLrdk ds varxZr gj funsZ'k dks fy[kuk fd bl lkW¶Vos;j dks pykus ds fy, dEI;wVj dks D;k&D;k funsZ'k nsus gksaxAs izR;sd funsZ'k Li"V gksus pkfg;s ftlls ,d lk/kkj.k O;fDr Hkh mu funsZ'kksa dk ljyrk ls iz;ksx dj ldsA funsZ'k iqfLrdk esa ;g funsZ'k Hkh Li"V gksuk pkfg;s fd bl lkW¶Vos;j dk dEI;wVj esa dSls iz;ksx djsaxs rFkk bl lkW¶Vos;j ls dSls ckgj fudysaxsA 1-5 izksxzke dk j[kj[kko (Maintaining the program) ,d ckj izksxkz e fy[kus ds ckn mlesa le; dh vko';drkuqlkj ifjorZu djus iM+rs gSA bl vko';drkuqlkj ifjorZu dks gh izkx s zke dk j[kj[kko dgrs gSA j[kj[kko dbZ ckj rks izksxzke dk iz;ksx djus okys dh vko';drk ds vuqlkj fd;k tkrk gSA vkSj dbZ ckj fu;e ifjorZu ds dkj.k djuk iM+rk gSA mnkgj.k ds fy, ,d izkx s kz e gS tks fd izksxkz ej A us jktLFkku ljdkj ds deZpkfj;ksa ds osru dh x.kuk djus ds fy, cuk;k gSA tc ;g izksxzke ;k lkW¶Vos;j fy[kk Fkk] ml le; ;g jktLFkku ljdkj }kjk funsZf'kr lHkh 'krksZ dh ikyuk djrk FkkA tSls gh ik¡pok osru vk;ksx ykxw gqvkA iqjkuk izksxzke rks iwjh rjg ls dke djsxk lkFk gh vc bl izksxzke dks u;s fu;eksa ds rgr vk/kqfud cukus ds fy, blds vanj ifjorZu djuk gksxkA vkSj ml ifjorZu ds vanj tks u;s fu;e ik¡pos osru vk;ksx esa gS mudk lekos'k djuk iM+sxkA bl rjg ls le;&le; ij ,d izksxzke dk j[kj[kko djuk cgqr t:jh gSA 1-6 fMcfxax izksxzke (Debugging Program) cx (Bug) dk eryc gksrk gS =qfV (error) vkSj fM$cx ;kfu fM dk eryc gVkuk] cx (Bug) dk eryc =qfV vFkkZr =qfV dks gVkukA fMcfxax ,d rjhdk gS ftlesa ge izksxzke ds vanj =qfV dk irk djrs gSA vkSj irk djus ds ckn ml =qfV dks lgh djrs gSA fdlh Hkh izkx s kz e ds vanj =qfV dks gVkus ds fuEu rjhds viuk;s tkrs gSA 1- fdlh izksxkz e ds NksVs Hkkx dks] eq[; izkx s kz e esa tksMu+ s ls igys mls vyx ls dEI;wVj ij ju djds ns[k ys fd bl NksVs izkx s zke ds vanj dksbZ =qfV gS ;k ugha gSA =qfV dh tkap djus ds i'pkr~ gh ml NksVs izksxzke dks] eq[; izksxzke esa tksM+k tk;sA 2- blds vUrxZr ge izksxzke ds vanj vfrfjDr osfj;cy ysdj mudh vkmViqV dh tkap izksxzke ds vanj chp&chp esa djrs jgrs gSA ftlls fd ge =qfV dk irk yxk ldrs gSA 3- MkVk dks Vsªl (Trace) djukA 1-7 flUVsDl =qfV (Syntax error) flUVsDl =qfV rc vkrh gS tc fdlh Hkk"kk dh xzkej dk fu;e ikyuk lgh <ax ls ugha fd;k x;k gksA ;g cgqr lkekU; =qfV gS tks fd vf/kdrj vkrh jgrh gS bl =qfV dks Bhd djuk Hkh ljy dEI;wVj foKku /81 gSA tc Hkh bl rjg dh =qfV izksxzke esa vkrh gS rks dEikbyj mlh le; crk nsrk gSA ftlls fd =qfV dks nwj djuk lqfo/kktud jgrk gSA rFkk ;g Hkh irk yx tkrk gS fd dgka ij =qfV gSA vkSj D;k gSA mnkgj.k ds fy,& # include <stdio.h> void main ( ) { printf ("\n enter the value of n"); scanf ("%", & n) } mijksDr izkx s zke dks tc ge dEI;wVj ij (Compile) dEikby djrs gSA rc og nks lwpuk s kz e esa fMDy;sj ugha fd;k x;k gSA nwljh nsxkA ,d ;g fd tks osfj;cy n dk iz;ksx fd;k gSA og izkx ;g fd scanf ds ckn lsehdkWyku ¼(½ dk iz;ksx ugha fd;k x;k gSA 1-8 ju Vkbe =qfV (Run time error) tc ge fdlh izksxzke dks dEikby djrs gS rks og fdlh Hkh izdkj dh =qfV ugha crkrk gSA ysfdu tc ml izkx s kz e dks dEI;wVj ij ju djrs gS] rks =qfV vkrh gSA bl izdkj dh =qfV dks ju Vkbe =qfV dgrs gSA mnkgj.k ds fy, ge la[;k esa Hkkx nsus dk izksxzke cukrs gSA # include <stdio.h> # include <conio.h> void main ( ) { int a, b, c printf ("\n enter value of a"); scanf ("%d", &a); printf("\n enter value of b"); Scanf("%d," & b); c=a/b; printf("\n division=%d," c); } mijksDr izkx s zke dks tc Hkh bl ge dEI;wVj ij dEikby djsaxs rks ;g fdlh Hkh izdkj dh =qfV ugha n'kkZ;sxkA ysfdu blh izksxzke dks tc ge dEI;wVj ij ju djsaxs vkSj a dk eku 6 o b dk eku 0 nsaxs rks ;g =qfV n'kkZ;sxkA bl izdkj dh =qfV dks ju Vkbe =qfV dgrs gSA D;ksafd fdlh Hkh uacj dks vxj ge 0 ls Hkkx nsaxs rks ifj.kke laHko ugha gSA D;ksafd dksbZ Hkh la[;k dks 0 ls Hkkx nsaxs rks ifj.kke vuUr (¥) vkrk gSA blh rjg vxj ge fdlh la[;k dk (log) ykWx fudkyus dk izksxzke cuk;s rks og Hkh tc dEikbyj ds }kjk vkCtsDV izksxkz e (object program) esa ifjofrZr djsxk] rc og fdlh Hkh izdkj dh =qfV ugha crk;sxkA ysfdu tc ge blh izksxzke dks dEI;wVj ij ju djs vkSj _.kkRed la[;k ns rks dEI;wVj foKku /82 gedks izksxzke esa =qfV feysxhA tks fd ju Vkbe =qfV gSA 1-9 rdZ =qfV (Logical Error) flUVsDl =qfV vkSj ju Vkbe =qfV ds ckn rdZ =qfV (Logical Error) vkrh gSA ;g =qfV lcls T;knk dfBu o lcls T;knk le; yxkus okyh gksrh gSA bl =qfV dks irk djus esa lcls T;knk le; yxrk gSA rdZ =qfV lk/kkj.kr;k tc vkrh gS] tc fdlh izksxzke ds dFku dks xyr rjhds ls fy[k nsrs gSA lcls vPNk mnkgj.k gS fd tc fdlh Hkh f}?kkr lehdj.k ax2+bx+c=0 ds ewy fudkyus ds fy, gy djrs gS rks ge fuEu izdkj fy[krs gSA d = b*b - 4*a*c; Root 1 = (-b+Sqrt (d))/ 2*a mijksDr izkx s kz e esa vxj ge ;g dksM fy[kdj dEikby djsx a s rks] dEikbyj fdlh Hkh izdkj dh =qfV ugha crk;sxkA vkSj tc blh izkx s kz e dks ju djsx a s vkSj a, b vkSj c dk eku nsx a s rks ge dHkh Hkh bl lehdj.k ds ewy lgh ugha fudky ik;sx as As dkj.k ;g gS fd Qkewy Z k ds fglkc ls igys ;g cszdVs ds vanj dk eku Kkr djsx a As mlds ckn bl eku dks 2 ls Hkkx nsx a As mlds ckn tks Hkh ifj.kke vk;sxk a As tcfd gekjk okLrfod lw= igys csd z Vs ds vanj dk eku fudkydj mldks mldks a ls xq.kk djsx 2a ls Hkkx nsuk gSA rks bl mijksDr izkx s kz e ls lgh ewy fudkyus ds fy, 2*a dks csd z Vs ds vanj fy[ksx a As Root 1 = (-b+Sqrt (d)) / (2*a); 1-10 izksCye lksfYoax esFkksMksyksth (Problem solving methodology) vc lkjs fu;e tkuus ds ckn vxyk dk;Z gSA bu fu;eksa dh ikyuk djuk vkSj iz'u dks gy djukA 1-10-1 leL;k dks le>uk (Understanding the problem) blds vUrxZr gedks tks Hkh leL;k nh gqbZ gS mldks le>uk gSA mnkgj.k ds fy, ;fn ,d izksxzke QSDVksfj;y fudkyus dk ;k izkbZe uEcj dk irk djus dk gSA bl leL;k dks gy djus ds igys QSDVksfj;y dks x.kuk djus dk lw= rFkk izkbZe (Prime) uEcj dk irk djus dk rjhdk ekywe gksuk pkfg,A vU;Fkk bl leL;k dks gy ugha dj ldrsA 1-10-2 de ls de buiqV dk irk djuk (Identifying Minimum Number of Inputs Required) leL;k dks le>us ds ckn vxyk dk;Z leL;k ls lacaf/kr buiqV dk irk djuk gS fd bl leL;k dks gy djus ds fy, fdrus buiqV osfj;oy dh vko’;drk gSA ftlls fd tks leL;k nh gqbZ gS og gy gks tk;s vkSj mldk vkmViqV fey tk;sA mnkgj.k ds fy, gedks C;kt fudkyus ds fy, izksxzke cukuk gS rks ge bl izksxzke dks gy djus ds fy, rhu buiqV osfj;oy P,R,T ysaxsA ;fn gesa ;g dgk tk;s fd izFke 10 izkd`r la[;kvksa dk tksM+ fudkyuk gS rks bl leL;k dkas gy djus ds fy, gesa fdlh Hkh buiqV osfj;oy dh t:jr dEI;wVj foKku /83 ugha gSA 1-10-3 LVsi ckbZ LVsi gy fudkyuk (Step by Step Solution) buiqV dk lgh rjhds ls irk djus ds ckn] vxyk dk;Z tks Hkh leL;k gS mldk ,YxksfjFke ;k ¶ykspkVZ cukuk gSA ftlls fd ml leL;k ls lacaf/kr gy ds lkjs LVsi n’kkZ;s tk;saA 1-10-4 vadxf.krh; ,oa rdZ vkWijs’kuksa dk irk djuk (Identification of Arithmetic and logic operations required for solution) leL;k dk lgh rjhds ls gy fudkyus ds ckn vxyk dk;Z ;g irk djuk gS fd fdl LVsi ij vadxf.krh; ,oa fdl LVsi ij rdZ vkWijs’kuksa dk iz;ksx djuk gSA ;g dk;Z ;fn ¶ykspkVZ cuk;k gS rks ¶ykspkVZ ds ckWDl ds vkdkj ls Hkh irk py ldrk gSA mnkgj.k ds fy, dgha Hkh ;fn fu.kkZ;d ckWDl (Decision Box) dk iz;ksx fd;k gS rks ogka ij rdZ vkWijs’ku yxsxk vkSj ;fn izkslsflax ckWDl dk iz;ksx fd;k gS rks vadxf.krh; vkWijs’ku yxsxkA 1-11 dUVªksy LVsªDpj (Control Structure) fdlh Hkh leL;k dks lgh rjhds ls gy djus ds fy, pkj izdkj ds dUVªky s LVªDpj gksrs gSaA 1vuqØe (Sequence) 2p;u (Selection) 3ywfiax (Looping) 4czkWfpax (Branching) 1-12 ywfiax %& ywfiax LVªDpj T;knkrj tc iz;ksx fd;k tkrk gS] tc ,d gh dFku ,d izksxzke esa dbZ ckj iz;ksx vk jgk gSA ywfiax rhu rjg dh gksrh gSA Ogkby (While) ¼i½ ¼ii½ Mw&Ogkby (do-While) ¼iii½ QkWj (for) 1-12-1 Ogkby ywi %& Ogkby ywi fdlh leL;k dks ;wtj }kjk bfPNr le; rd fu"iknu djus ds fy, dke esa vkrh gSA Step 1. Step 2. Step 3. Step 4. Step 5. n¬1 while n <10 x ¬ a * (1+r/100) write x,n n ¬ n+1 Step 6. end while dEI;wVj foKku /84 1-12-2 Mw&Ogkby ywi %& Mw&Ogkby ywi] Ogkby ywi dh rjg gh dke djrh gS varj dsoy bruk gh gS fd blesa 'krZ dh tk¡p ckn esa djrs gSa tcfd Ogkby esa igys djrs gS fuEu mnkgj.k es cksul ds eku dh x.kuk dh xbZ gSA ftlesa izkjfEHkd lSysjh 2000 var lSysjh 4000 ,oa vUrjky 100 :- gSA cksul lSysjh dk 20 izfr'kr gksxkA Step 3. Step 4. Salary ¬ 2000 do bonus ¬.02xSalary write bouns Salary ¬ Salary +100 while salary <=4000 Step 5. end Step 1. Step 2. 1-12-3 Qksj ywi %& Qksj ywi lk/kkj.kr;k tc iz;ksx djrs gSa tc fu"ikfnr djus ds igys gh vkidks irk gks fd ;g ywi fdruh ckj fu"ikfnr gksxhA 1-13 ,d vPNs izksxzke dh fo'ks"krk,sa (Characteristics of a good program) 1fjyk;scy (Reliable) 2bfQfl;Ulh (Efficiency) 3jhMsfcyhVh (Readability) 4eSVa us fs cfyVh (Maintainability) 5iksVsZcfs yVh (Portability) 1-13-1 fjyk;scy (Reliable) :- fjyk;scy dk eryc gS fd ,d izksxzke bl rjg dk gksuk pkfg,] tks fdlh Hkh ifjfLFkfr esa dke djrk gksA vkSj ;g Hkh ekuk tkrk gS fd izksxkz e dk ifj.kke 'kq) gksxkA ftruh T;knk izksxzke dh 'kq)rk gksxh mruh T;knk gh izksxzke fjyk;scy gksxkA ,d izksxzke ftldk fd ifj.kke lgh o 'kq) ugha gks og izksxzke fjyk;scy ugha gSA 1-13-2 bfQfl;Ulh (Efficiency) :- ,d izkx s zke dks fy[kus ds dbZ rjhds gks ldrs gSA ysfdu bfQfl;UV izkx s zke og gksrk gS tks fd de txg ysrk gSA rFkk tks fd fu"iknu (Executive) esa de le; yxkrk gSA bl rjg ds izksxzke ds }kjk dEI;wVj dk ewY; de gks tkrk gS] D;ksafd dEI;wVj dh eseksjh o le; nksuksa gh e¡gxs gksrs gSA 1-13-3 jhMscfyVh (Readability) izksxzke dh lcls ize[q k fo'ks"krk jhMscfyVh gksrh gSA jhMscfyVh dk eryc gS fd ,d izksxzke bl rjg dk fy[kk gksuk pkfg, fd dksbZ Hkh O;fDr izksxzke dks vklkuh ls le> ldsA 1-13-4 eSaVsusfcyhVh (Maintainability) lk/kkj.kr;k izksxzke le; vkSj 'krksZa ds vuqlkj ifjorZu gksrk jgrk gSA vc mlh izksxzke dks dEI;wVj foKku /85 u;s fljs ls nqckjk fy[kuk dfBu o T;knk le; yxus okyk gksrk gSA vr% bl ifjfLFkfr ls fuiVus ds fy, gesa izkx s zke bl rjg dk cukuk pkfg;s ftlls fd ml izksxzke esa ifjorZu djuk vklku gksA 1-13-5 iksVsZfcyhVh (Portability) ,d iksVsZcy izksxzke og gksrk gS ftls fdlh Hkh dEI;wVj ij ju dj ldrs gksA ,d vPNs izkx s zke gksus ds fy, mijksDr lkjh fo'ks"krk,a gksuh pkfg;sA egRoiw.kZ fcUnq 12345- fdlh izksxzke ds gy dks vyx vyx LVsi esa fn[kkus dks ,YxksfjFke dgrs gSA ekM+;wyj izLrko esa cMs izksxzke dks NksV& s NksVs izksxzkeksa esa ckaV nsaxsA ju Vkbe =qfV] izksxzke dks ju djrs le; vkrh gSA cx dk eryc gS =qfV vkSj Mh cx dk eryc gSaA =qfV dks gVkukA ,d vPNs izkx s zke dh fo'ks"krk,sa gksrh gSA (i) fjyk;soy (Reliable) (ii) bfQfl;Ulh (Efficiency) (iii) jhMsoyhVh (Readability) (iv) eSaVsusfcfyVh (Mantainability) (v) iksVZsfcfyVh (Portability) vH;klkFkZ iz’u cgq p ;ukRed iz ’ u 1fMokbM ckbZ thjks (Divide by zero) =qfV gSA ¼v½ flUVsDl =qfV (Syntax error) ¼c½ ykWthdy =qfV (Logical error) ¼l½ ju Vkbe =qfV (Run Time error) ¼n½ mijksä esa ls dksbZ ugha 2flUVsDl =qfV (Syntax error) dk irk fd;k tkrk gSA ¼v½ ju djrs le; ¼c½ dEikby djrs le; ¼l½ izkxs kz e cukrs le; ¼n½ dHkh Hkh ugha y?kq R jkRed iz ' u 1ekM~;wy D;k gksrk gS \ 2iksVsZfcfyVh ls vki D;k le>rs gSa \ 3cx D;k gksrk gS \ 4. ,d vPNs izksxzke dh fo'ks"krk,¡ crkb;s \ fucU/kkRed iz ' u 1 fdUgha Hkh rhu la[;kvksa dk vkSlr fudkyus dk ,YxksfjFke cukb;s \ 2,sjj fdrus izdkj dh gksrh gS \ mÙkjekyk 1- ¼l½ 2- ¼c½] dEI;wVj foKku /86 1 C++ Hkk"kk esa izksxzke cukuk (Programming in C++) 1.11 Getting Started ge C++ esa izksxzke cukus ls igys ,d cus gq;s izksxzke dk v/;;u djrs gSaA ge blls ;g tku ik;saxs fd C++ izksxzke dh lajpuk dSlh gksxhA // sample.CPP fVIif.k;k¡ // To demostrate Program structure # include <iostream.h> Class XYZ { Private : int A; Public: Void getdata (int x) {A = x;} Void showdata ( ) {count <<"\ n data is " << A;} }; Void main ( ) { XYZ OBJ1, OBJ2; OBJ1.getdata (15); OBJ2.getdata (35); Dykl fu/kkZj.k Dykl ds lnL; vk¡dMs Dykl ds lnL; QaD'ku vkWCtsDV dh ?kks"k.kk vk¡dM+s fu/kkZfjr djus ds fy, lnL; QaD'ku pykuk OBJ1.showdata ( ); OBJ2.showdata ( ); } vk¡dMs iznf'kZr djus ds fy, dEI;wVj foKku /87 mijksDr izksxkz e dh izFke nks iafDr;ka '//' v{kj ls vkjEHk gks jgh gaS budks fVIi.kh iafDr;ka ¼desUV ykbu½ dgrs gSaA ;s iafDr;k¡ dEI;wVj }kjk fu"ikfnr (Execute) ugha dh tkrhA ;s dsoy izkx s zke dks le>us ;ksX; cukus ds fy;s gksrh gSA '//' ls vkjEHk gksus okyh lHkh ia fDr;ka fVIi.kh iafDr;ka dgykrh gSaA ge fdlh Hkh iafDr ds igys '//' v{kj yxkdj ml iafDr dks fVIi.kh iafDr esa cny ldrs gaSA ;s iafDr;ka izkx s zke dk Hkkx gksrh gS ijUrq u rks dEI;qVj bUgs i<+rk gS vkSj u gh buls dksbZ dk;Z gksrk gSA vxyh iafDr # v{kj ls vkjEHk gaSA bls izh izksll s j Mk;jsfDVo dgrs gaSA ;g dEikbyj dks L=ksr izksxzke (Source code) esa vU; Qkbykas dks 'kkfey djus dk funs'Z k nsrk gSA vxyh iafDr esa Dykl dks fu/kkZj.k gsrq funsZ'k gSA bl iafDr esa Class lqjf{kr 'kCn gS rFkk XYZ Dykl dk uke gSA lqjf{kr 'kCnksa dk izR;sd Hkk"kk esa fo'ks"k vFkZ gksrk gSA dks"Bd ds e/; Dykl dh iwjh ifjHkk"kk gSA ifjHkk"kk esa izFke iafDr esa Private fy[kk gS rFkk vxyh iafDr esa ,d pj A, iw.kkZad (integer) izdkj dk ?kksf"kr gSA ;s dEikbyj dks crkrs gS fd A ,d pj gS tks iw.kkZd a izdkj dk gS rFkk ;g Private gSA vFkkrZ ;g pj] lnL; QaD'ku dks NksMd + j vU; QaD'kukas ds fy,s miyC/k ugha gksxk A tcfd Public Hkkx dsa vk¡dM+s ;k QaD'ku eq[; izkx s kz e ;k vU; QaD'kuksa ds fy, Hkh miyC/k jgrs gSA tSlk fd Public Hkkx esa nks QaD'ku getdata o showdata gSA bu QaD'kukas dks eq[; izksxkz e vFkok vU; QaD'ku esa lh/ks mi;ksx (Call }kjk) fd;k tk ldrk gSA vxyh iafDr esa class dh ifjHkk"kk lekIr gksrh gSA vxyh iafDr Void main ( ) eq[; izksxzke dk vkjEHk crkrh gSA Void bl ckr dh lwpuk nsrk gS fd ;g eq[; izksxkz e fdlh izdkj dk vkmViqV ugha nsrkA blh izdkj main ds vkxs [kkyh dks"Bd ;g lwpuk nsrk gS fd ;g izksxzke fcuk iSjkehVj (No argumint) dk gSA vxyh iafDr nks vkWCtsDV mRiUu djus dk funsZ'k nsrh gS A ;s vkWCtsDV XYZ Dykl izdkj ds gksaxAs okLro esa tc vkWCtsDV mRiUu gksrs gSa rHkh muds vk¡dM+ksa dks] laxzfgr djus ds fy, eSejs h esa txg feyrh gSA bl iafDr ls nksuksa vkWCtsDV ds fy, OBJ1.A, OBJ2.A nks pj mRiUu gksaxsA vxyh nks iafDr;k¡ vkWCtsDV ds fy, lnL; QaD'kuksa dks pyk dj vkWCtsDV ds pjksa dk eku fu/kkZfjr djrh gSA vxyh nks iafDr;k¡ iqu% vkWCtsDV ds nwljs lnL; QaD'kuksa dks pykdj vkWCtsDV ds pjksa dk eku LØhu ij iznf'kZr djrh gSA vfUre iafDr esa Main izksxzke dh lekfIr dk dks"Bd gaSA 1-2 C++ esa dke vkus okys v{kj (C++ character set) dEI;wVj esa fy[ks tkus okys C++ ds izkx s zke ds 'kCn] la[;k,sa] lehdj.k] vkfn ftu v{kjksa ls fey dj curs gS mUgsa C++ Hkk"kk ds v{kjksa dk lewg (character set) dgrs gSaA v{kjksa ds lewg dks ge bu Hkkxksa esa ckaV ldrs gSA dEI;wVj foKku /88 ¼1½ ¼2½ ¼3½ ¼4½ v{kj (Alphabate) vad (Digit) fo'ks"k v{kj (Special character) [kkyh txg (White space) ¼1½ v{kj %& vaxzsth o.kZekyk esa dke vkus okys v{kj A, B, C, D ..........Z, a, b, c, d, ................z ¼2½ vad %& 0] 1] 2] 3] 4] 5] 6] 7] 8] 9¼3½ fo'ks"k v{kj , Comma & Ampersand . Period ^ Caret ; Semicolon * Asterisk ? Question mark - Minus sign ' Apostrope + Plus sign " Quotation mark < Less than sign ! Exclamation mark > Greater than | Vertical bar ( Left Parenthesis / Slash ) Right Parenthesis \ Backslash [ Left brace } Right bracket _ Underscore { Left bracket ~ Tilde Sign $ Dollar sign ] Right brace % Percent sign # Number sign [kkyh txg (White space) (1) Blank space (2) Horizontal tab (3) Carriage return (4) New line (5) Form feed dEI;wVj foKku /89 1-3 C++ Vksdu (C++ Tokens) fdlh Hkh Hkk"kk esa fy[ks x;s izksxkz e dh NksVh ls NksVh bdkbZ dks ml Hkk"kk ds fpUg ¼Vksdu½ dgrs gSA C++ Hkk"kk esa fuEu izdkj ds fpUg gSA C++ Vksdu lqjf{kr 'kCn fLFkjkad 10]&15-5 LVªhax " ABC" Class, Int vkWijsVj +, -,* igpku ds uke Amount fo'ks"k fpUg #, $, % 1-3-1 igpku ds uke rFkk lqjf{kr 'kCn (Identifier and Reserve word) C++ Hkk"kk ds izR;sd 'kCn ;k rks lqjf{kr 'kCn gksrs gSa ;k fQj igpku ds uke A lHkh lqjf{kr 'kCn dk ,d fuf'pr vFkZ gS tks cnyk ugha tk ldrkA ;s lqjf{kr 'kCn gh fdlh izkx s kz e ds eq[; rRo gksrs gaSA dqN lqjf{kr 'kCnksa dh lwph fuEufyf[kr gSA izksxzke esa bUgsa ges'kk vaxzsth o.kZekyk ds NksVs v{kjksa esa fy[krs gaSA auto break case char const continue do double else enum float for go if int long return short sizeof static short igpku ds uke (Idintifier) struct switch union void while fdlh Hkh pj] QaD'ku vFkok vkO;wg vkfn ds uke dks igpku dk uke dgrs gaSA ;s uke ge viuh bPNkuqlkj j[krs gaSA ;s uke v{kj vFkok vadksa ls feydj cus gksrs gSAa budk igyk v{kj vaxst z h o.kZekyk dk v{kj gksuk pkfg;sA uke o.kZekyk ds NksVs] cM+s vFkok nksuksa v{kj ls cus gks ldrs gaSA dEI;wVj foKku /90 fo'ks"k v{kj dk mi;ksx uke esa ugha djrsA '_' (underscore) v{kj dk mi;ksx fd;k tk ldrk gSA 1-3-2 fLFkjka d (Constants) fLFkjkad mudks dgrs gaS ftuds eku izksxzke ds pyus ds nkSjku cnyk u tk ldsA tSls gesa fdlh izksxzke esa p dk eku dke ysuk gks vkSj PI = 3.14 gksxkA izkx s zke esa tgka ij Hkh PI 'kCn dk mi;ksx gksxk ogka ij 3-14 eku dke vk;sxkA vr% PI ,d fLFkjkad dgyk;sxkA vkxs ge mu fLFkjkadksa ds izdkj o mi;ksx djus ds rjhds ds ckjs esa i<a+sxsA 1-3-3 vkWijs Vj (Operators) vkWijsVj ge mu ladsr fpUgksa dks dgrs gSa tks fdlh lafØ;k ds ckjsa esa ladsr nsrs gSAa tSls %& B=3+2 ;gka nks lafØ;k fpUg gS ,d '$' o nwljk ' ='A ;s fpUg ladsr nsrs gaS fd 3 o 2 dk tksM+ djuk gS rFkk B ds eku dkss ;ksx ds ifj.kke ds eku ds cjkcj djuk gSA ;s fofHkUu izdkj ds gksrs gSaA ftudk v/;;u bl v/;k; esa vkxs djsaxsA 1-4 C++ Hkk"kk ds izksxzke dk <+k¡pk (Structure of a C++ Program) ge ,d lk/kkj.k izksxzke ysdj mldk v/;;u dj pqds gSaA vc iqu% ,d NksVs ls izksxkz e o mlesa dke vkus okys rRoksa dk vyx&vyx v/;;u djrs gSA # include <iostream.h> void main ( ) { cout << " every language has its own grammer"; } bl NksVs ls izksxzke esa ge main QaD'ku include Mk;jsfDVo o gSMj Qkbyksa ds ckjs esa i<+saxsA 1-4-1 Qa D'ku %& mDr izksxzke esa dsoy ,d gh QaD'ku gS ftldk uke main gSA izksxzke dh igyh iafDr tks # include ls vkjEHk gks jgh gS og bl QaD'ku dk Hkkx ugha gSA geus igys ns[kk gS fd Dykl ds vUnj Hkh QaD'ku gks ldrs gaS ftUgsa ge ml Dykl dk lnL; QaD'ku dgrs gSa]ij esEcj QaD'ku ds vfrfjDr LorU= QaD'ku Hkh gks ldrs gSaA gekjs izksxzke esa QaD'ku dk uke main gS rFkk blds vkxs dks"Bd yxs gSaA ;fn ge dks"Bd u yxk;as rks dEikbyj bls pj dk uke Hkh eku ldrk gS vr% QaD'ku ds vkxs dks"Bd yxkuk vko';d gSA bu dks"Bdksa esa ge QaD'ku vkjX;wesUV fy[krs gSaA QaD'ku ds uke ls iwoZ void fy[kk gS tks ;g crkrk gS fd ;g QaD'ku dksbZ Hkh eku okil ugha djrkA QaD'ku vkjX;weUs V o eku okil djus ds ckjs esa ge vkxs i<+saxsA QaD'ku ds uke dh vxyh iafDr rFkk vfUre iafDr esa e>ys dks"Bd gSA ;s dks"Bd QaD'ku ds vkjEHk o vUr dh lwpuk nsrs gSaA izR;sd QaD'ku ds funsZ'kkas dks ges'kk e>ys dks"Bd ds vUnj fy[kuk pkfg;sA izR;sd izksxkz e dk igyk funsZ'k tks fu"ikfnr (execute) gksrk gS og main QaD'ku dk vkjEHk dEI;wVj foKku /91 gksrk gSA fdlh Hkh izkx s kz e esa ,d ls vf/kd QaD'ku gks ldrs gaS A ijUrq main QaD'ku dk gksuk vko';d s zke gS rFkk lcls igyk QaD'ku main gh gksuk pkfg;s tks fu"ikfnr (execute) gksA ;fn fdlh izkx esa main QaD'ku ugha gksxk rks fyadj xyfr;k¡ crk;sxkA 1-4-2 # bUDyw M Mk;js fDVo (# include directive) bl izkx s zke dh igyh ykbu # include< iostream.h> gSA ;g u rks fdlh QaD'ku dk Hkkx gS vkSj u gh izksxzke dk dFku (statement)A ;fn ;g fdlh QaD'ku dk Hkkx gksrh rks e>ys dks"Bd ds chp gksrk vkSj ;fn izkx s zke dk okD; gks rks lsehdkyu (;) ls [kRe gksrkA ;g iafDr # ¼gS'k½ fpUg ls vkjEHk gks jgh gSA bUgsa izhizkslslj Mk;jsfDVo dgrs gSaA ;s iafDr;ka ¼izhizkl s slj Mk;jsfDVo½ dEI;wVj dks funsZ'k nsus ds ctk; dEikbyj dks funsZ'k nsrh gaSA dEik;yj bu funsZ'kksa dh ikyuk izksxzke ds dEikbys'ku ds le; djrk gSA # include izhizkslslj Mk;jsfDVo dEikbyj ls vU; Qkbyksa dks gekjs izksxzke ds L=ksr Qkby (Source Code) esa Mkyus dk funsZ'k nsrk gSA 1-4-3 gSMj Qkbysa (Header Files) gesa izksxzke cukrs le; dbZ xf.kr ds QaD'ku tSls sin, cos, exp vkfn dk mi;ksx djrs gaSA C++ Hkk"kk esa ;s QaD'ku igys ls cus gq;s gaS rFkk budks C++ Hkk"kk dh Math Library esa j[kk gqvk gSA rFkk bu lHkh QaD'kuksa dks budh fØ;kvksa ds vuqlkj vyx&2 Qkbyksa esa laxzfgr dj j[kk gSA tSls xf.kr ds QaD'ku math.h Qkby es]a cin, cout ds iostream.h, esa vkfn bUgsa ge gSMj Qkby dgrs gSaA ge ;g dg ldrs gaS fd gSMj Qkby esa lEcfU/kr fØ;kvksa dh ifjHkk"kk,a o laikfnr djus ds rjhds laxzfgr gSA tSls& iostream.h esa cout o <<, cin o >> dh ifjHkk"kk laxzfgr gSA ;fn ge izksxzke ls igys iostream.h gSMj Qkby dks # include }kjk 'kkfey ugha djsaxs rks dEikbyj cout o cin vFkZ ugha le> ik;sxkA blh izdkj ;fn setw( ) QaD'ku izkx s zke esa dke yas rks iomanip.h gSMj Qkby dks 'kkfey djuk vko';d gSA 1-5 C++ esa vkxe fuxZe (Input / Output in C++) 1-5-1 cout gekjs izksxzke esa cout << "every language has it's own grammer"; dFku dk iz;ksx okD; dks LØhu ij iznf'kZr djus ds fy;s fd;k x;k gSA C++ Hkk"kk esa cout ,d vkWCtsDV gS rFkk ;g ekud fuxZe LVªhe (standard out put stream) ls lEcfU/kr gSA rFkk ;g C++ Hkk"kk esa iwoZ ifjHkkf"kr gSA bldk mi;ksx v{kjksa ;k mlds lewg dks LØhu ij iznf'kZr djus vFkok vU; fuxZe ;qfDr (Output device) ij Hkstus ds fy, fd;k tkrk gSA 1-5-2 cin dEI;wVj foKku /92 blh izdkj cin Hkh ,d vkWCtsDV gSA ;g ekud vkxe LVªhe ls lEcfU/kr gS rFkk ;g C++ esa iwoZ ifjHkkf"kr gSA ;g dq¡th iVy }kjk ;k vU; vkxe ;qfDr (input device) }kjk dEI;wVj esa Mkys x;s vkadMksa dks xzg.k dj dEI;wVj esa laxzfgr djus ds mi;ksx esa vkrk gSA 1-5-3 bUl'kZu vkWijsVj ('<<') (Insertion Operator) bl vkWijsVj dks iqV (put) vkWijsVj Hkh dgrs gSaA bldk mi;ksx cout vkWCtsDV ds lkFk fd;k tkrk gSA bldk dk;Z blds nka;ah rjQ ds pj ds eku dks cka;h rjQ ds vkWCtsDV (cout) dh rjQ Hkstuk gSA tSl& s uhps fy[ks izkx s kz e esa ;g vkWijsVj cka;h rjQ fy[ks lans'k "inter temprature in fahrenhit" dks nka;ah rjQ vFkkZr cout vkWCtsDV dh rjQ Hkst nsrk gSA ;gka ;g /;ku j[kuk vko';d gS fd ;gh vkWijsVj ,d&,d fcV dks cka;h rjQ f'k¶V djrk (Left Shift - bit wise) gSA 1-5-4 ,DlVs ªD 'ku vkWi js Vj ('>>') (Extraction operator) bl vkWijsVj dks xsV Ýkse (get from) vkWijsVj Hkh dgrs gaSA bldk mi;ksx cin vkWCtsDV ds lkFk fd;k tkrk gSA bldk dk;Z cka;h rjQ fy[ks vkWCtsDV ds eku dks nka;h rjQ fy[ks pj esa laxzfgr djkuk gSA tSls vkxs fy[ks izkx s zke esa ;g cin vkWCtsDV ls izkIr eku dks ftemp pj esa laxzfgr dj nsrk gSA bl vkWijsVj dk mi;ksx ,d&,d fcV dks nka;ha rjQ f'k¶V djus (bit wise right shift) ds fy, Hkh gksrk gSA # include <iostream.h> void main ( ) { float ftemp,ctemp; cout<<"enter temprature in fahrenheit:"; cin >> ftemp; ctemp = (ftemp - 32)* 5/9; cout <<" temprature in celsius = " << ctemp; } 1-6 vkxe&fuxZe vkWijsVlZ dk ,d ls vf/kd ckj mi;ksx (Cascading of I/O Operators) bUl'kZu vkWijsVlZ dk mi;ksx ,d iafDr esa ,d ls vf/kd ckj Hkh fd;k tk ldrk gSA tSls izksxzke ds vfUre iafDr esa cout vkWCtsDV ds lkFk nks ckj iqV (<<) vkWijsVj dk mi;ksx fd;k x;k gSA bl izdkj mi;ksx djus ij ck;sa ls nk;ssa Øe esa fØ;k gksxh vFkkZr igys "Temprature in celsius", dEI;wVj foKku /93 cout vkWCtsDV dh rjQ Hkstx s k mlds ckn Ctemp pj ds eku dks cout vkWCtsDV dh rjQ Hkstx s kA blh izdkj bUl'kZu vkWijsVj >> dks Hkh ge ,d iafä esa ,d ls vf/kd ckj mi;ksx dj ldrs gSA 1-6-1 endl o setw dk iz;ksx (Use of endl and setw) setw rFkk endl nksuksa gh nLrdkj (Manipulator) dgykrs gaSA budk iz;ksx bUl'kZu ('<<') vkWijsVj ds lkFk fd;k tkrk gSA ;s vkadMks dks lqLi"V :i ls iznf'kZr djrs gSaA ;fn ge izkx s zke esa budk iz;ksx djs rks iomanip.h gSMj Qkby dks vko';d :i ls include dj yasA (1) endl :- bl nLrdkj dk iz;ksx ubZ iafDr ij tkus ds fy, ;k ,d iafDr vkxs f[kldus ds fy, fd;k tkrk gSA bldk izHkko "\n" ¼cSdLys'k v{kj½ ds izHkko ds tSlk gh gksrk gSA vkxs fy[ks izksxzke esa bldk iz;ksx rFkk mudk ifj.kke n'kkZ;k x;k gSA (2) setw:- cout vkWCtsDV ds }kjk tc ge ekuksa dks iznf'kZr djrs gaSA rks gj eku dks mruh gh txg nh tkrh gS ftrus v{kj dk eku gaS tSls ekuk X = 1203 gks rks x dk eku iznf'kZr djus ds fy, 4 v{kj dh txg feysxh ;fn ge pj ds ekuksa dks o muds e/; dh txg dks bPNkuqlkj iznf'kZr djuk pkgsa rks setw ( ) eSfuiqyVs j dk mi;ksx djuk iM+sxkA ge ,d ,slk izksxzke cukrs gSa tks rhu fo|kfFkZ;ksa ds uke o muds vad iznf'kZr djrk gSA # include <iostream.h> void main ( ) { int A = 105, B=1203, C=15; cout <<"NAME"<< "MARKS" <<"\n" <<"Rajesh" <<A <<'\n" << "Raghuveer" << B << "\n" <<"Monu" <<C << "\n"; } bl izksxzke dk fuxZe (output) bl izdkj gksxk NAME MARKS Rajesh105 Raghuveer1203 Monu15 ;g vkmViqV fn[kus esa Hkh vPNk ugha yx jgk] vkSj u gh bls vklkuh ls le>k tk ldrk gSA ;fn blh izksxzke dks bl izdkj fy[kk tk;s fd lHkh uke ,d lh/k esa gks rFkk muds vad nka;h rjQ ls ,d lh/k esa gksA # include <iostream.h> # include <iomanip.h> void main ( ) { int A=105, B=1203, C=15; dEI;wVj foKku /94 cout <<setw(10)<<''NAME"<<setw(6)<<"MARKS"<<endl <<setw(10)<<''Rajesh"<<setw(6)<<A<<endl <<setw(10)<<''Raghuveer"<<setw(6)<<B<<endl <<setw(10)<<''Monu"<<setw(6)<<C<<endl; } rks fuxZe (output) bl izdkj gksaxsA NAME MARKS Rajesh 105 Raghuveer 1203 Monu 15 setw (n) eSuhiqyV s j iznf'kZr fd;s tkus okys vkadMks vFkok v{kjksa ds fy, nh n v{kj dh txg fuf'pr dj nsrk gSA la[;kvksa dk nka;ha rjQ ls fy[krk gS tcfd v{kjksa dks cka;h rjQ lsA vr% setw eSuhiqyVs j dk iz;ksx dj ge Output dks lqLi"V cuk ldrs gSA xyfr;k¡ (Errors) izksxzke cukrs le; dbZ ckj Vkbi djus esa xyrh gks tkrh gS] ;k fdlh dFku dks fy[krs le; xyr rjhds ls fy[k nsrs gS ;k dbZ vU; izdkj dh xyfr;k¡ gks tkrh gSA ;s xyfr;k¡ dEikbyj ;k fyadj }kjk <wa<h tk ldrh gSA ;fn izksxzke esa fdlh izdkj dh xyrh gks rks dEikbyj ;k fyadj bl lEcU/k esa LØhu ij lans'k iznf'kZr djrk gSA dEikbyj dsoy mu xyfr;ksa dks <wa<+dj crkrk gS tks Hkk"kk ds dFku fy[kus ds rjhdksa ls lEcfU/kr gksrh gS tSls dFku ds vUr esa lsehdkyu u yxkuk] fdlh pj dk ?kksf"kr u djuk bR;kfnA ekuk geus fdlh dFku ds vUr esa lsehdkyu ugha yxk;k rks dEikbyj izksxzke dks dEikby djrs le; LØhu ij lans'k iznf'kZr djsxkA tSls error C:\EXAM.CPP 8:statement missing; in function main ( ) ;g lans'k crkrk gS fd exam.cpp izkx s zke dh 8oha iafDr esa tks dFku fy[kk gS mlesa lsehdkWyu ¼;) ugha gSA foUMks esa dlZj Hkh mlh ykbu ij gksxk tgka laHkor% xyrh gS ;k ftl LFkku ij dEikbyj dh xyrh feyhA ekml dks fDyd djds vFkok dq¡th iVy ij dksbZ Hkh dq¡th nckdj] dlZj dks fu;r LFkku ij ykdj xyrh nwj dh tk ldrh gSA fydaj fyfdax ls lEcfU/kr izdkj dh xyfr;k¡ <wa<rk gS tSls gekjs izksxzke esa main ( ) uke ls dksbZ QaD'ku gh u gks vkfnA ;fn ,slk gS rks fyadj fuEu lan's k iznf'kZr djsxkA Linker error : undefined symbol_main in module. dEI;wVj foKku /95 1-6-2 ju Vkbe =qfV (Run time error) ju Vkbe xyrh os xyfr;k¡ gS tks izksxzke ds pykus ij gh Kkr dh tk ldrh gSA fdlh la[;k dks 'kwU; 0 ls Hkkx nsuk] ;k ;fn LVSd dke fy;k gks vkSj oks Hkj x;k gksA ;s ,slh xyfr;k¡ gS tks dEikbys'ku ls Kkr ugha gksrhA budks Kkr djus ds fy, izksxzke dks pykuk gh iMsxkA 1-7 lEiknd dk iz;ksx (Use of Editor) C++ esa izkx s zke cukus ds fy, tc ge C++ ds lkW¶Vos;j dks load djrs gS rks tks lcls igys fo.Mks LØhu ij iznf'kZr gksrh gS mls C++ Hkk"kk dk lEiknd (Editor) dgrs gaSA The Turbo C++ Screen with edit window igyh ckj ;g fo.Mks [kkyh gksxhA blds ehuw ckj esa File, Edit, Search, Run, Compile, Debug, Project, Option, Windows, Help ehuw gksaxsaA izksxzke cukus ds fy, bl lEiknd esa Vkbi djuk vkjEHk dj nsaA tc Qkby esa izkx s zke Vkbi dj pqds gkas vkSj laxfz gr djuk pkgas rks Qkby ehuw es ls SAVE fodYi dk p;u djsAa ;gka bPNkuqlkj uke Vkbi dj OK cVu dk p;u djasA bl izdkj fdlh Hkh Qkby esa izkx s zke Vkbi dj laxfz gr dj yasA Qkby dk foLrkj uke ges'kk -CPP gh j[ksaA rst xfr ls Vkbi djus gsrq dqN fo'ks"k dq¡ft;ksa dk iz;ksx djuk vko';d gSA uhps lwph esa dqN dEI;wVj foKku /96 dq¡ft;k¡ o muds mi;ksx fn;s x;s gSA dqath dk;Z dlZj dks ,d iafDr Åij ys tkus ds fy;sA dlZj dks ,d iafDr uhps ys tkus ds fy;sA dlZj dks ,d LrEHk nk;sas ys tkus ds fy;sA dlZj dks ,d LrEHk ck;sa ys tkus ds fy;sA Ctrl + f dlZj dks ,d 'kCn ck;sa ys tkus ds fy;sA Ctrl + g dlZj dks ,d 'kCn nk;sas ys tkus ds fy;sA HOME dlZj dks iafDr ds izFke LFkEHk ij ys tkus ds fy;sA END dlZj dks iafDr ds vfUre v{kj ij ys tkus ds fy;sA Pgdn LØhu dks ,d LØhu uhps ys tkus ds fy;sA Pgup LØhu ij fy[ks v{kjksa dks ,d LØhu Åij ys tkus ds fy;sA ENTER dlZj dks ubZ iafDr ij ykus ds fy;sA Backspace dlZj ds ck;sa fLFkr ,d v{kj dks gVkus ds fy;sA DEL dlZj ds Åij fy[ks v{kj dks gVkus ds fy;sA INS bUlVZ eksM ON/OFF djus ds fy;sA 1-7-1 lEiknd (Editor) ds izeq[k dek.M (Basic Command of Editor) C++ Hkk"kk esa izksxzke cukus o fu"ikfnr (Exequte) djus ds fy, lEiknd (Editer) dk mi;ksx fd;k tkrk gSA ;g lEiknd (Editer) iwoZ esa fn[kk;sa fp= ds vuqlkj iznf'kZr gksrk gS bl lEiknd esa rst xfr ls dk;Z djus ds fy, dqN dek.M fu/kkZfjr gSAa ;s lHkh dek.M o mudk mi;ksx fuEukuqlkj gSA dek.M & mi;ksx F2 & Qkby dks Hk.Mkfjr (Save) djus ds fy;sA dEI;wVj foKku /97 F3 & Hk.Mkfjr (Save) Qkby dks [kksyus ds fy;sA F4 & izksxzke dks dEikby djus ds ckn dlZj ij tkus ds fy;sA Alt+X & lEiknd (Editer) ls ckgj fudyus ds fy;sA Alt+BSP & fd;s x;s dk;Z dks feVkus ds fy, (Undo)A Shift+Alt+BSP & feVk;s x;s dk;Z dks iqu% ykus ds fy, (Redo)A Shift+Del & p;fur Hkkx dks gVkus o fDyi cksMZ ij Hk.Mkfjr djus ds fy;sA Ctrl+INS & p;fur Hkkx dh izfrfyfi djus ds fy, o fDyi cksMZ ij Hk.Mkfjr djus ds fy, (Copy)A Shift+INS & fDyi cksMZ ij Hk.Mkfjr Hkkx dks iqu% izksxzke esa ykus ds fy, (Paste)A Ctrl+Del & p;fur Hkkx dks gVkus ds fy,A Ctrl+L & fdlh 'kCn dks <wa<rs le; tc ,d ckj og 'kCn fey tk;s rks vxys LFkku ij ml 'kCn dks <wa<us ds fy,A Ctrl+F9 & izksxzke dks fu"ikfnr (Execute) djus ds fy,A Alt+F7 & dEikby djrs le; fiNyh xyrh (Previous Error) ij dlZj dks ys tkus ds fy,A & Alt+F8 dEikby djrs le; vxyh xyrh (Next Error) ij dlZj dks ys tkus ds fy,A 1-8 dEikbfyax ,oa fyafdx (Compiling and linking) tks izksxzke ge lEiknd (editor) esa Vkbi dj laxzfgr (Save) djrs gaS og L=ksr Qkby (Source file) dgykrh gSA ;g ,d ASCII Qkby gksrh gSA vFkkZr bl Qkby esa fy[ks izksxzke dks pyk ugha ldrsA bl izkx s zke dks pykus ds fy, bls pyus ;ksX; (Executable) Qkby esa ifjofrZr djuk gksxkA ;g ifjorZu nks pj.kksa esa gksrk gSA ¼1½ dEikbfyax ¼2½ fyafdax dEI;wVj foKku /98 dEikbfyax (Compiling) dEikbfyax dk vFkZ L=ksr Qkby (Source file) dks vkWCtsDV (object) file esa cnyukA dEikbfyax ds nkSjku izksxzke dks e'khu Hkk"kk (Binary form) esa cnyk tkrk gSA ;g e'khu Hkk"kk esa fy[kk izksxzke gh dEI;wVj ij py ldrk gSA ij pykus ls iwoZ fyfadx a djuk Hkh vko';d gSA Main Source file Anather Source file First.CPP Second.CPP COMPILER COMPILER First.OBJ Second.OBJ LINKER First.EXE Executable File fyafdax (Linking) fyafdax dk vFkZ gS fd ;fn ,d ls vf/kd vkWCtsDV Qkbyas gSa rks bu lcdks ,d lkFk djukA dbZ cM+s&2 izksxzkeksa esa ,d ls vf/kd Qkbysa gksrh gSA ftUgsa ,d lkFk djuk vko';d gSA ;fn ,d ls vf/kd vkWCtsDV Qkby u gks rks Hkh fyafdax vko';d gSA gks ldrk gS fd geus # include Mk;jsfDVo ds }kjk gSMj Qkby ;k ykbczsjh Qkby dk mi;ksx fd;k gksA gSMj Qkby ;k ykbczsjh Qkby dks eq[; Qkby ds lkFk tksMu+ s ds fy, Hkh fyafdax vko';d gSA fp= esa dEikbfyax o fyafdax esa e/; lEcU/k crk;k x;k gSA fyfdax djus ds ckn gh izksxzke pyus ;ksX; gksxkA lk/kkj.kr;k% pyus ;ksX; Qkby ,d ls vf/kd vkWCtsDV Qkbyksa ls feydj curh gSA dEikby djus ds fy, Qkby dks [kksydj laxzfgr (Save) djus ds ckn Qkby ehuw esa dEI;wVj foKku /99 Compile to OBJ form fodYi dk p;u djasA ,slk djus ls dEikby foUMks iznf'kZr gkasxhA ;fn izksxzke esa fdlh izdkj dh xyrh ugha gS rks 0 Error, Success : Press any key lans'k iznf'kZr gksxkA bl izdkj tks vkWCtsDV Qkby cusxh mldk uke ogh gksxk tks L=ksr Qkby dk gSA dsoy foLrkj uke .obj gksxkA fyad djus ds fy, dEikby ehuw esa ls Link Exe File fodYi dk p;u djsAa bl izdkj vkWCtsDV Qkby vU; vkWCtsDV Qkby ls feydj pyus ;ksX; (Executive) Qkby curh gSA bldk foLrkj uke .exe gksxkA izksxzke dks pykuk (Execution of Program) pyus ;ksX; (Executable) Qkby dks pykus ds fy, Run ehuw esa ls Run fodYi dk p;u djs ;k dq¡th iVy ij Ctrl + F9 dq¡th;kW nck;asA ,slk djus ij izksxzke pysxk rFkk ifj.kke ns[kus ds fy, dq¡th iVy ij Alt + F5 nck;sa ;k fo.Mks ehuw esa ls User Screen fodYi dk p;u djasA 1-9 C Hkk"kk dh vkxe&fuxZe fØ;k, (Input-Output operations from C Language) lh Hkk"kk esa tks vkxe fuxZe fØ;k,sa miyC/k gSa yxHkx lHkh C++ Hkk"kk esa Hkh miyC/k gSA eq[;r% ;s fØ;k,sa LVªhax dks i<+us ;k fizUV djus ds fy,s mi;ksx esa yk;h tkrh gSaA ¼1½ gets ( ) :gets ( ) -QaD'ku stdio.h gSMj Qkby ds vUnj gksrk gSA ;g QaD'ku ,d LVªhx a dks i<+us ds dke vkrk gSA mnkgj.k % ,d pj char name [20]fMDys;j fd;k x;k gS ge bl pj dk eku mi;ksxdrkZ }kjk dq¡th iVy ds ek?;e ls i<us ds fy,s fuEu izkx s zke fy[ksaxsA #include <stdio.h> # include <conio.h> void main() { char name[20]; printf ("\n enter the name"); gets(name); puts (name); getch ( ); } 2½ puts ( ) :puts ( ) -QaD'ku Hkh gets() dh rjg gh dk;Z djrk gSA bldk mi;ksx fdlh LVªhx a ds eku dks fizUV djus ds fy,s fd;k tkrk gSA rFkk tc Hkh ge ml QaD'ku dk mi;ksx djsaxs rks stdio.h gSMj Qkby dk iz;ksx djsaxsA dEI;wVj foKku /100 vH;kl iz’u oLrqf u"B iz’ u fuEufyf[kr iz’uks esa lgh fodYi dk pquko dhft, 1 fUkEu esa ls C++ Hkk"kk ds Vksdu ugha gS :¼v½ fLFkjkad ¼c½vkWijsVj ¼l½ vkWCtsDV ¼n½ fo'ks"k fpUg 2 iostream.h Qkby gS :¼v½ ykbZczsjh Qkby ¼c½ izh izkl s slj Mk;jsfDVo ¼l½ gSMj Qkby ¼n½ desUV ykbZu 3 bUl'kZu vkWisjVj (<<) dk mi;ksx gksrk gS :¼v½ cout ds lkFk ¼c½ cin ds lkFk ¼l½ # ds lkFk ¼n½ mijksDr es ls dksbZ ugha 4 izh izkl s l s j Mk;jsfDVo funsZ'k nsrs gSa :¼v½ CPU dks ¼c½ dEIkkbyj dks ¼l½ mDr nksukas dks ¼n½ mijksDr esa ls dksbZ ugha 5 setw ,d :¼v½ izh izkslslj Mk;jsfDVo gSA ¼c½ vkWCtsDV gS ¼l½ esU;qiqyVs j gS ¼n½ mijksDr es ls dkbZ ugha vfry?kq Ù kjkRed iz ’ u 1 gSMj Qkby ls vki D;k le>rs gS ? 2 izh izkslslj Mk;jsfDVo dk D;k mi;ksx gS ? 3 esU;qiqysVj fdls dgrs gS ? 4 lEiknd (Editor) ls vki D;k lEk>rs gS ? 5 desUV ykbZu ls vki D;k lEk>rs gS ? budk mi;ksx izksxzke esa fdl izdkj djrs gS le>kb;sAa fucU/kkRed 1 C++ esa dke vkus okys v{kj (character) dkSu dkSu ls gS A 2 C++ ds Vksdu ls vki D;k le>rs gS ? fofHkUu Vksduks dks le>kb;sA 3 cin,cout, >> ,<< dk C++ Hkk"kk esa D;k mi;ksx gSS ? le>kb;sA 4 dEIkkbfyax o fyafdax ls D;k le>rs gS ? lfp= le>kb;sA 5 igpku ds uke (Identifire) o lqjf{kr 'kCn (Reserve Word) ls vki D;k le>rs gS ? mnkgj.k lfgr le>kb;sA mÙkjekyk 1 ¼l½ 4 ¼c½ 2 ¼l½ 5 ¼l½ 3 ¼v½ 2 vk¡dMksa ds izdkj] pj] fLFkjkad (Data Type, Variable, Constant) 2-1 fLFkjkad (Constants) fLFkjkad mUgsa dgrs gSa ftudk eku izksxzke ds fu"iknu ds nkSjku cnyk u tk ldsA C++ esa fuEu izdkj ds fLFkjkad gksrs gSA fLFkjkad Constant v{kj fLFkjkad vadh; fLFkjkad Character Constant Numeric Constant iw.kkZad okLrfod Integer real ,d v{kj Single Character v{kjksa dk lewg String 2-1-1 iw.kkZad fLFkjkad (Integer Constant) %& fcuk n'keyo fpUg ds vadksa dk lewg ftldk eku izksxzke ds fu"iknu ds nkSjku cnyk uk tk ldsa] dks ge iw.kkZad fLFkjkad dgrs gSAa ;s fuEu izdkj ds gksrs gSa %& ¼1½ Mslhey (Decimal) iw.kkZad fLFkjkadA ¼a2½ vkDVy (Octal) iw.kkZad fLFkjkadA ¼a3½ gsDlkMsfley (Hexadecimal) iw.kkZd a fLFkjkadA dEI;wVj foKku /102 Msfley iw.kkZad fLFkjkad (Decimal Integer Constant) Msfley iw.kkZd a fLFkjkad esa dsoy 0 ls 9 rd ds vadksa dk mi;ksx fd;k tk ldrk gSA vkDVy iw.kkZad fLFkjkad (Octal Integer Constant) vkDVy iw.kkZd a fLFkjkad esa 0 ls 7 rd ds vadksa dk mi;ksx fd;k tk ldrk gSA fLFkjkad ls igys v{kj 'O' fy[kuk vko';d gSA gSDlkMsfley iw.kkZad fLFkjkad (Hexadecimal Integer Constant) gSDlkMsfley iw.kkZad fLFkjkad esa 0 ls 9 rd ds vad o A, B, C, D, E o F v{kjksa dk mi;ksx dj ldrs gSaA gSDlkMsfley esa fy[ks iw.kkZad fLFkjkad ds iwoZ "Ox" v{kjksa dk iz;ksx vko';d gSA fdlh Hkh iw.kkZad fLFkjkad ds igys '+' vFkok ^&* dk fpUg yxk;k tk ldrk gSA buds vfrfjDr fdlh Hkh fo'ks"k v{kj (Special character) dk iz;ksx ugha fd;k tk ldrkA lgh Msfley iw.kkZd a fLFkjkad xyr Msfley iw.kkZd a fLFkjkad 123 &321 0 $ 78 15 750 20]000 10-5 lgh vkWDVy iw.kkZd a fLFkjkad xyr vkWDVy iw.kkZd a fLFkjkad xyrh O37 O2 O435 O37.15 O380 O390.5 O551 370 n'keyo fpUg ugha gksA vad 8 dk iz;ksx ugha gksA vad 9]o n'keyo fpUg ugha gksuk pkfg,A izFke v{kj 0 gksuk pkfg;sA lgh gSDlkMsfley iw.kkZd a fLFkjkad xyr gSDlkMsfley iw.kkZd a fLFkjkad xyrh OX2 OX9F OXbcd OX2.0 OXG2 abc n'keyo fpUg ugha gksuk pkfg;sA G v{kj ugha gksuk pkfg;sA izFke v{kj Ox gksuk pkfg;s $ 1000 xyrh [kkyh txg ugha gksuh pkfg, dkWek ¼]½ dk iz;ksx ugha djuk $ fpUg ugha gksuk pkfg;sA n'keyo fpUg ugha gksA dEI;wVj foKku /103 iw.kkZad fLFkjkad dk vf/kdre eku dEI;wVj ij fuHkZj djrk gSA ;fn dEI;wVj 16 bit dk gS rks 32767 vf/kdre eku gks ldrk gS vkSj ;fn dEI;wVj 32 bit dk gS rks vf/kdre eku 2] 147] 483] 647 gks ldrk gSA iw.kkZad fLFkjkad ds vUr esa U, L, ;k UL v{kj yxkdj cM+h la[;k,a Hkh laxzfgr dh tk ldrh gSA bu v{kjksa ds vFkZ fuEukuqlkj gSA U - Unsigned L - Long integer UL - Unsigned long integer 2-1-2 okLrfod fLFkjkad (Floating Point Constant) iw.kkZad fLFkjkad ds }kjk mu ekuksa dks iznf'kZr ugha fd;k tk ldrkA tks eku ,d ls NksVk gks ;k ,d dk NksVk Hkkx tSls 0-56] 0-23] 0-5] 0-32 vkfnA budks iznf'kZr djus ds fy;s okLrfod la[;kvksa dk iz;ksx djrs gaSA iw.kkZd a fLFkjkad o okLrfod fLFkjkad ds e/; dsoy bruk lk vUrj gS fd okLrfod fLFkjkad esa n'keyo (.) fpUg gks ldrk gS tc fd iw.kkZd a fLFkjkad esa ughaA mnkgj.k 0.00083, -0.85, 768.39, +220.0 n'keyo fpUg ds igys vFkok ckn esa vad dk gksuk vko';d ugha gSA mnkgj.k ds fy;s 245., .115, -.159 vkfn Hkh lgh okLrfod iw.kkZad gSA okLrfod la[;kvksa dks oSKkfud rjhds ls ?kkrkad :i esa Hkh fy[k ldrs gSaA tSls 2]00]000 dks ge 2 x 105 ;k 2-0e+ 5 Hkh fy[k ldrs gaAS dEI;wVj esa la[;kvkas dks ?kkrkad :i esa fy[kus ds fy,s fuEu izk:i gSA Mantissa e Exponant eSUVhlk Hkkx iw.kkZad la[;k ;k okLrfod la[;k gks ldrh gSA blds ckn v{kj 'e' dk gksuk a la[;k gksxhA Exponent rFkk v{kj 'e' ds e/; $ vFkok vko';d gaS rFkk Exponent Hkkx ,d iw.kkZd & fpUg gks ldrk gSA mnkgj.k 1.2 e -4, 0.95 e 4, 1.9 e + 50, 1.2 e -2 okLrfod la[;kvksa dks ?kkrkad :i esa ge rc fy[krs gaS tc la[;k cgqr vf/kd cM+h vFkok cgqr vf/kd NksVh gksA 2-1-3 v{kj fLFkjkad (Character Constant) ;s nks izdkj ds gksrs gSAa igyk ,d v{kj okys fLFkjkad vkSj nwljk v{kjksa ds lewg dk fLFkjkadA ¼1½ ,d v{kj fLFkjkad (Single Character Constant) ,d v{kj dk fLFkjkad dsoy ,d v{kj dk cuk gksrk gS tks fd ' ' (Single quote) fpUgksa ds vUnj nsus gksrs gaSA mnkgj.k 'C', 'P', '9', 'x' vkfnA ;gk¡ '9' v{kj fLFkjkad o 9 la[;k nksuksa fHkUu&2 gSaA izR;sd v{kj fLFkjkad dk ,d fuf'pr ASCII eku gksrk gSA dEI;wVj foKku /104 tSls 'd' dk ASCII eku 100 gSA 'a' dk ASCII eku 97 gSA ;fn pwfa d izR;sd v{kj fLFkjkad dk ASCII eku la[;k gksrh gS vr% bu ij vadxf.krh; x.kuk Hkh dh tk ldrh gSA 2-1-4 v{kjksa dk lewg fLFkjkad (String Constant) tSlk uke ls Kkr gksrk gS ;s fLFkjkad ,d v{kj ds u gksdj ,d ls vf/kd v{kjksa dk lewg gksrk gSA ;s fLFkjkad " " (double quotes) fpUgksa ds e/; nsus gksrs gSaA ;s fdlh Hkh v{kj ls feydj cus gks ldrs gSa] pkgs vad gks] v{kj ;k fo'ks"k v{kjA mnkgj.k "RAMESH", "Wel Come", "2005", "C" "200+5+6" ;gka /;ku nsus dh ckr gS fd 'C' o "C" nksuksa vyx&2 gSa tgka 'C' ,d v{kj fLFkjkad gS ogh "C" v{kjksa dk lewg fLFkjkad gSA 'C' ,d ASCII eku gksxk tc fd "c" dk ughaA 'kCnksa ;k 'kCn lewgksa ij fØ;k djus ds fy, v{kjksa dk lewgksa dk mi;ksx fd;k tkrk gSA 2-1-5 cSdLys'k v{kj fLFkjkad (Backslash Character Constant) C o C++ Hkk"kk esa fuxZe dk;Z (Output Operation) ds fy, dqN fuf'pr cSd Lys'k v{kj fLFkjkad gS budk fo'ks"k vFkZ gksrk gSA tSls "\n" dk vFkZ ubZ iafDr gSA vU; cSd LyS'k v{kj fLFkjkad o muds ifj.kke uhps lwph esa fn;s x;s gaSA 2-2 "\a" "\b" "\f" "\n" "\r" "\t" audible alert back space form feed New line Carriage return horizontal tab "\v" vertical tab "\' " single quote "\" " double quote "\?" question mark "\\" back slash "\0" null character vk¡dM+ks ds izdkj] pj] fLFkjkad vk¡dM+ks ds izdkj (Data Type) ge izksxzke esa fofHkUu izdkj ds vk¡dM+ksa dk mi;ksx djrs gaS tSls integer, float, Array vkfnA izksxzke esa vk¡dM+ksa dk izdkj crkrs le; gesa ;g /;ku j[kuk vko';d gS fd gekjs vk¡dM+ks dk vf/kdre eku D;k gks ldrk gSA rFkk ;s vk¡dM+s fdl izdkj gekjh Le`fr (Memory) esa de ls de LFkku ?ksjAs tSls integer izdkj ds vk¡dM+s dsoy 2 ckbV txg ?ksjrs gSA ijUrq buls vf/kdre 32767 dEI;wVj foKku /105 eku gh laxfz gr dj ldrs gSA Long int izdkj ds vk¡dMs yxHkx 2 vjc eku rd la[;k laxfz gr dj ldrs gS aA ij os txg Hkh 4 ckbV dh ?ksjrs gaSA vr% gesa vko';drkuqlkj vk¡dM+ksa ds izdkj dk p;u djuk pkfg;sA C++ Hkk"kk esa vk¡dM+s fuEufyf[kr izdkj ds gksrs gSaA ¼1½ izkbejh] fcYV&bu ;k Q.Mkes.Vy izdkj ds vk¡dM+s A ¼2½ ;wtj fMQkbUM izdkj ds vk¡dM+s A ¼3½ MsjkbOM izdkj ds vk¡dM+sA izkbejh izdkj ds vk¡dM+ksa dk izk:i iwoZ fu/kkZfjr gksrk gS vr% budk iz;ksx djrs le; dsoy buds izdkj dk uke gh crkuk gksrk gS vU; xq.k/keZ iwoZ fu/kkZfjr gksrs gSa tSls int, float, char vkfnA tcfd ;wtj fMQkbUM esa lHkh xq.k/keZ bUgsa ifjHkkf"kr djrs le; crkus gksrs gS A tSls ;s vk¡d a M+s fdu&2 ls feydj cus gksaxs] buds D;k eku gksaxs] budk uke D;k gksxk vkfnA tSls fd Dykl esa ge ;g crkrs gS fd Dykl esa fdl&fdl izdkj ds vk¡dM +sgksaxs] bldk uke D;k gksxk vkfnA MsjkbCM izdkj ds vkadM+s tks izkFkfed izdkj ds vk¡dM+ks ls feydj cus gksrs gks tSls ,js] LVªDpj vkfnA 2-2-1 izkbejh izdkj ds vk¡dM+s (Primary Data Type) tSlk ge i<+ pqds gaS fd bu vk¡dM+ksa dk izk:i iwoZ fu/kkZfjr gksrk gSA buds fofHkUu izdkj] vko';d Le`fr txg (Memory Space) o buds }kjk laxfz gr vf/kdre eku fuEu lwph esa fn;k gSA vk¡dMks dk eku tks ;s xzg.k dj ldrs gSA vko';d LFkku vf/kdre eku int 2 byte -32768 ls + 32767 short int long int 1 byte 4 byte -128 ls + 127 -2,147, 483, 648 ls +2,147, 483, 647 unsigned int unsigned short int 2 byte 1 byte 0 ls 65535 0 ls 255 unsigned long int signed char 4 byte 1 byte 0 ls 4, 294, 967, 295 -128 ls + 127 unsigned char 1 byte 0 ls 255 float double 4 byte 8 byte 3.4e - 38 ls 3.4 e + 38 1.7e - 308 ls 1.7e +308 long double 10 byte 3.4e - 4932 ls 3.4e + 4932 izkbejh izdkj ds vk¡dM+s eq[;r% pkj izdkj ds gh gksrs gSAa (1) char (2) int (3) float (4) double ijUrq buls iwoZ long, short, signed o unsigned yxkdj budh laxzg.k {kerk de ;k T;knk dEI;wVj foKku /106 dj ldrs gSAa ,d lkFk ,d ls vf/kd 'kCn Hkh yxk ldrs gSa A tSls signed long int esa long o signed nksuks 'kCn yxs gSaA char :- fdlh Hkh ,d v{kj dks character izdkj dk vkadM+k dgrs gSA ;s 1 BYTE LFkku ?ksjrs gSA int :- iw.kkZd a izdkj ds vkdM+s] ftuesa n'keyo fpUg dk iz;ksx u gks] dks integer izdkj ds vk¡dM+s dgrs gSaA ;s eseksjh eas 2 BYTE LFkku ?ksjrs gSaA buds igys Signed, long, unsigned 'kCn yxkdj budh laxzg.k {kerk dks de ;k T;knk fd;k tk ldrk gSA float :- okLrfod la[;kvksa dks floating izdkj ds vk¡dM+s dgrs gaSA buesa n'keyo fpUg dk gksuk vko';d gSA buds izk:i ds ckjs esa ge fLFkjkad i<+rs le; i<+ pqds gSAa ;fn buesa laxzfgr la[;k dh 'kq)rk c<+kuk gks rks float ds LFkku ij double izdkj ds vk¡dM+ksa dk iz;ksx djsaA float izdkj ds vk¡dM+s tgka n'keyo fpUg ds ckn 6 vad rd laxzfgr dj ldrs gS ogh double izdkj ds vk¡dM+s n'keyo ds ckn 14 vad rd dh la[;k dks xzg.k dj ldrs gaSA ;wtj fMQkbUM izdkj ds vk¡dMs o fMjkbOM izdkj ds vk¡dMksa ds ckjs esa ge vkxs v/;;u djsaxsA 2-2-2 const:;g ,d lqjf{kr 'kCn (Reserved Word) gSA bldk iz;ksx fdlh Hkh vk¡dM+s dks ifjHkkf"kr djrs le; vkadM+s ds izdkj ls iwoZ fd;k tkrk gSA ;g bl ckr dh tkudkjh nsrk gS fd vkadM+s fLFkjkad izdkj ds gSa A vr% bldk eku iwjs izksxzke esa cnyk ugha tk ldrkA ;fn ge izksxzke esa bl eku dks cnyus dk iz;kl djsaxs rks dEikbyj xyrh dk lans'k iznf'kZr dj nsxkA mnkgj.k ds fy, fuEu izksxzke # include <iostream.h> void main ( ) { float rad, area; const float PI = 3.14159; cout <<"Enter radius of circle"; cin >>rad; area = PI * rad * rad; cout << "area of circle is"<<area <<"\n" ; } bl izksxzke ds vUnj PI dk eku float izdkj dks ?kksf"kr gSA ijUrq float 'kCn ds iwoZ const 'kCn ;g Hkh ?kksf"kr djrk gS fd PI dk eku iwjs izksxzke esa 3.14159 gh jgsxk] cnysxk ughaA bl izdkj fLFkjkadksa ds iwoZ const 'kCn dk iz;ksx djus ls izksxzke dks i<+dj ;g Kkr fd;k tk ldrk gS fd dkSu&2 ls fLFkjkad dk iz;ksx izkx s kz e esa fd;k x;k gSA ;fn bldk eku Hkwyo'k cnyus gsrq izkx s zke esa dFku fy[kk gks rks dEikbyj bl dFku ij xyrh dk lans'k fn[kk nsrk gSA 2-2-3 pj (Variables) vk¡dM+kas dks laxfz gr djus gsrq tks uke iz;ksx esa ysrs gaS mUgsa ge pj dgrs gSA pj] izkx s kz e ds pyus dEI;wVj foKku /107 ds nkSjku fofHkUu eku xzg.k dj ldrs gaAS pj ds uke izkx s kz e cukrs le; izkx s kz ej }kjk fn;s tkrs gSA ;s uke bl izdkj fn;s tkus pkfg;s fd tks vk¡dM+s ;s xzg.k djs mldk vFkZ tkuk tk ldsA tSls %& COUNTER, Length, classize, total vkfnA fdlh Hkh pj dk uke] vaxzsth o.kZekyk ds v{kj] vad ;k '-' (underscore) v{kj ls feydj cuk gks ldrk gSA fdlh Hkh pj dk uke nsrs le; fuEu fu;eksa dk /;ku j[kk tkrk gSA ¼1½ uke dk igyk v{kj vaxzsth o.kZekyk ds v{kjksa esa ls gksuk pkfg;sA ¼2½ uke lk/kkj.kr;k 31 v{kjksa dk gks ldrk gSA gkykafd dqN dEikbyj dsoy izFke 8 v{kjksa dks gh egRo nsrs gaSA ¼3½ vaxst z h o.kZekyk ds cM+s v{kj o NksVs v{kj vyx&2 ekus tkrs gaSA tSls AMIT o amit vyx&2 gksaxsA ¼4½ uke dksbZ lqjf{kr 'kCn (key word) ugha gks ldrkA ¼5½ uke ds e/; [kkyh LFkku u gksA lgh ukeksa ds dqN mnkgj.k ramesh, X1, school_name, sum1, distance x_y vkfnA xyr uke dkj.k char lqjf{kr 'kCn dk mi;ksx ugha gksxkA price$ $ fpUg dk mi;ksx ugha gksxkA group one [kkyh txg ugha gksxhA 2-2-4 pjksa dh ?kks"k.kk (Decleration of Variables) pj dk uke fuf'pr djus ds ckn bUgsa izksxzke esa mi;ksx djus ls iwoZ ?kksf"kr djuk gksrk gSA ;g ?kks"k.kk dEikbyj dks nks ckrsa crkrh gSA ¼1½ pj dk uke ¼2½ pj fdl izdkj ds vk¡dM+s xzg.k djsxk ;k pj dks Le`fr (Memory) esa fdruh txg dh vko';drk gksxhA izkFkfed izdkj ds pjksa dh ?kks"k.kk fuEu izdkj ls dh tk ldrh gSA vkadM+s dk izdkj pj1] pj2] -----------------( ;gka pj 1] pj 2] ----------- vkfn mu pjksa ds uke gS tks fd fn;s x;s izdkj ds gSA ;fn ;s ,d ls vf/kd pj gks rks buds e/; dksek (,) gksuk vko';d gSA iafDr ds vUr esa ( (semicolon) gksuk vko';d gSA mnkgj.k % int int float xyz; p, q, sum; noofst, average; ,d iafDr esa ,d gh izdkj ds vk¡dM+ksa dks ?kksf"kr dj ldrs gSaA nwljs izdkj ds fy, vyx iafDr;ka iz;ksx djsaA dEI;wVj foKku /108 2-2-5 pjksa dks izkjafHkd eku nsuk (Initialisation of Variables) ;fn ge pkgas rks pj ds izdkj dh ?kks"k.kk ds lkFk&2 pj dks vkjfEHkd eku Hkh ns ldrs gaSA vk¡dM+ksa ds izdkj pj 1 ¾ eku] pj 2 ¾ eku -----------------( mnkgj.k & int x = 20, y = 39, z = 15; fdlh Hkh pj ds izkjfEHkd eku nsuk initialisation dgykrk gSA bl izdkj ge pj dh ?kks"k.kk ds lkFk vkjfEHkd eku Hkh ns ldrs gaSA pj dks vkjfEHkd eku nsus dk vU; rjhdk Hkh gSA blesa igys pjksa dh ?kks"k.kk djrs gSa rFkk ckn esa buds izkjfEHkd eku nsrs gSaA int x, y, z; x=20; y=39; z=15; bl izdkj Hkh ge pj dks vkjfEHkd eku ns ldrs gaAS 2-3 vlkbuesUV dFku (Assignment Statement) fdlh Hkh pj esa dksbZ eku xzg.k djkus ds fy, tks dFku fy[kk tkrk gS mls vlkbuesUV dFku dgrs gSaA bl dFku esa '=' ¼cjkcj½ dk fpUg dk mi;ksx fd;k tkrk gSA fdlh Hkh pj esa eku xzg.k djkus dk fuEu rjhdk gS& pj dk uke ¾ eku ; mnkgj.k initial = 0; Mid = 30; Average = 25.29; Yes = p + q ; bu dFkuksa dk vFkZ bl izdkj gS fd ^¾* fpUg ds nk;ha vksj fy[ks eku vFkok vfHkO;fDr dk eku ^¾* fpUg ds ck;ha rjQ fy[ks pj esa xzg.k djkosaA vr% Yes = p + q dFku esa igys pj p o q dk eku tksMus ds i'pkr~ dqy vk;s ifj.kke dks yes pj esa xzg.k djk;k tk;sxkA dFku x = x + 1 esa nk;ha vksj ds pj x ds eku esa 1 tksM+us ds ckn tks eku vk;k mls ck;ha vksj ds pj x esa xzg.k djkosaA ekuk fd x dk eku 5 gks rks bl dFku ds fu"ikfnr gksus ds ckn x dk eku x+1 = 6 gks tk;sxkA dEI;wVj foKku /109 2-4 vkWijsVlZ ,oa vfHkO;fDr (OPERATORS & EXPRESSIONS) vkWijsVj fpUg ,oa dFku (Operator Sign and Statement) C o C++ Hkk"kk esa fofHkUu izdkj ds vkWijsVj (Operators) dke esa fy;s tkrs gSA tSls +, -, *, = vkfnA vkWijsVj fpUg os fpUg gksrs gaS tks dEI;wVj dks vk¡dM+ksa ij vadxf.krh; ;k rkfdZd fØ;k,a djus ds ckjs esa funsZ'k nsrs gaSA vkWijsVj fuEu izdkj ds gksrs gaSA ¼1½ vFkZesfVd vkWijsVj (Arithmetic Operator) ¼2½ fjys'kuy vkWijsVj (Relational Operator) ¼3½ ykWftdy vkWijsVj (Logical Operator) ¼4½ bUØhesUV@fMfØesUV vkWijsVj (Increament / Decreament Operator) ¼5½ dUMh'kuy vkWijsVj (Conditional Operator) 2-4-1 vFkZe s fVd vkW i js V j %& C/C++ Hkk"kk esa fuEu vFkZesfVd vkWijsVj miyC/k gSaA ;s vkWijsVj vadxf.krh; lafØ;k,sa vFkkZr~ la[;kvksa ij lafØ;k djus ds fy;s mi;ksx esa yk;s tkrs gSaA vkWijsVj dk;Z + tksM+us ds fy, ;k /kukRed fpUg ds fy,A & ?kVkus ds fy, ;k _.kkRed fpUg ds fy;sA * xq.kk djus ds fy,A @ Hkkx nsus ds fy,A % 'ks"kQy Kkr djus ds fy,A Hkkx nsrs le; ;fn la[;k,a iw.kkZad (integer) izdkj gh gS rks HkkxQy esa n'keyo ds ckn dh la[;k,a gVk nh tkrh gSA tSls 16@5 ¾ 3 ftu pjksa vFkok ekuksa ij lafØ;k gksrh gS mUgsa ge vkWijs.M dgrs gSaA ;gkWa 16 o 5 ij lafØ;k gks jgh gS vr% budks vkWijs.M dgasxs rFkk bu nksuksa vkWijs.M ij Hkkx lafØ;k gks jgh gSA ;fn fdlh vfHkO;fDr esa lHkh vkWijs.M iw.kkZad izdkj ds gks rks ml vfHkO;fDr dks iw.kkZd a vfHkO;fDr (integers expression) dgrs gSA bl lafØ;k dk ifj.kke Hkh iw.kkZad izdkj dk gksxkA mnkgj.k ds fy;s ekuk a=28, o b=5 gks rks a - b = 23 a + b = 33 a * b = 140 a/b=5 a%b=3 'ks"kQy lafØ;k ds ifj.kke dk fpUg izFke vkWijs.M ¼HkkT;½ ds fpUg ds cjkcj gksrk gS vFkkZr HkkT; _.kkRed gS rks 'ks"kQy Hkh _.kkRed gksxkA ;fn HkkT; /kukRed gS rks 'ks"kQy Hkh /kukRed dEI;wVj foKku /110 gksxkA ;fn fdlh vfHkO;fDr esa lHkh vkWijs.M okLrfod vksijsUM gks rks ml vfHkO;fDr dks okLrfod vfHkO;fDr dgrs gSA okLrfod la[;kvksa esa n'keyo ds ckn 6 vad gh vkrs gSA vr% lafØ;k dk ifj.kke yxHkx leku gksrk gaSA tSls x = 1.0/3.0 = 0.333333 y = 2.0/3.0 = 0.666667 'ks"kQy vkWijsVj (%) okLrfod la[;kvksa ij dk;Z ugha djrkA ;g dsoy iw.kkZad la[;kvksa ij gh dk;Z djrk gSA 2-4-2 fjys ' kuy vkW i js V j ge izksxzke esa dbZ ckj nks pjksa dh rqyuk djrs gSA rFkk muds lEcU/k ds vk/kkj ij fu.kZ; ysrs gaSA tSls nks oLrqvksa ds ewY; dh rqyuk djuk vkfnA rqyuk djus gsrq tks lafØ;k fpUg ¼vkWijsVj½ dke esa vkrs gS mUgsa fjys'kuy vkWijsVj dgrs gaSA C++ esa fuEu N% fjys'kuy vkWijsVj gSA vkWijsVj vFkZ < ls NksVk gSA <= ls cjkcj ;k NksVk gSA > ls cM+k gSA >= ls cjkcj ;k cMk gSA == ds cjkcj gSA != ds cjkcj ugha gSA fdlh vfHkO;fDr esa fjys'kuy vkWijsVj gks rks bl vfHkO;fDr dks fjys'kuy vfHkO;fDr dgrs gSA fdlh Hkh fjys'kuy vfHkO;fDr dk ifj.kke lgh ¼1½ ;k xyr ¼0½ gksrk gSA tSls 10 < 20 = lgh ¼1½ 20 < 10 = xyr ¼0½ ,d lk/kkj.k fjys'kuy vfHkO;fDr esa ,d fjys'kuy vkWijsVj o nks vksijsUM (operand) gksrs gSA fjys'kuy vfHkO;fDr dk fuEu izk:i gksrk gSA AE1 R.O. AE2 ;gka R.O. ,d fjys'kuy vkWijsVj gSA rFkk AE1 o AE2 nksuks vFkZefs Vd dFku gS] tks fLFkjkad ;k pj ;k budk lewg gks ldrs gSAa ;fn fdlh fjys'kuy vfHkO;fDr esa] vFkZefs Vd vkWijsVj gks rks igys vFkZefs Vd vkWijsVj pysaxs mlds ckn fjys'kuy vkWijsVjA mnkgj.k ekuk x = 2, rFkk y=5 gks rks x+9 > y*2 esa igys x + 9 o y*2 ds eku igys fudysxk mlds ckn 11 > 10 dFku pysxk ftldk ifj.kke lgh ¼1½ vk;sxkA 2-4-3 ykW f tdy vkW i js V j C o C++ Hkk"kk esa rhu ykWftdy vkWijsVj gSa] tks fuEu gSA dEI;wVj foKku /111 vkWijsVj vFkZ && || Logical AND Logical OR ! logical NOT ykWftdy vkWijsVj & & (AND) o || (OR) dk iz;ksx ,d ls vf/kd fjys'kuy vfHkO;fDr dks feykus ds fy;s fd;k tkrk gSA tSls %& (a > b) & & (a = = 100) ;fn fdlh vfHkO;fDr esa nks ;k nks ls vf/kd fjys'kuy vfHkO;fDr dks feykdj fy[kk tk;s rks mls ykWftdy vfHkO;fDr dgrs gSA ykWftdy vfHkO;fDr dk ifj.kke Hkh lgh ¼1½ ;k xyr ¼0½ gksxkA tSlk VªFw k Vscy esa crk;k x;k gS && (AND) vkWijsVj ds iz;ksx okys vfHkO;fDr dk ifj.kke lgh ¼1½ dsoy rHkh gksxk tc && vkWijsVj ds nksuksa rjQ ds fjys'kuy vfHkO;fDr dk eku lgh ¼1½ gksA tcfd || (OR) vkWijsVj okys vfHkO;fDr dk ifj.kke xyr (0) dsoy rHkh lgh gksxk tcfd nksuksa rjQ dh fjys'kuy vfHkO;fDr xyr (0) gks mnkgj.k if (Marks > 60 && age < 14) bl dFku dk eku lgh dsoy rc gksxk] tcfd Marks] 60ls cM+k gS rFkk age 14 ls NksVh gksA ykWftdy vfHkO;fDr dk izk:i RE1 RE2 AND && OR || 0 0 0 0 0 1 0 1 1 0 0 1 1 1 1 1 TRUTH TABLE 2-4-4 bUØhesUV o fMfØesUV vkW ijsV j (Increment and Decrement Operator) C o C++ Hkk"kk esa nks fo'ks"k vkWijsVj bUØhesUV o MhfØesUV vkWijsVj miyC/k gaS tks vU; Hkk"kk esa ugha gaSA baØhesUV vkWijsVj 1 tksM+us ds fy, o MhfØesUV vkWijsVj 1 ?kVkus ds fy, mi;ksx esa fy;s tkrs gaSA nksuksa vkWijsVj ,d vksijsUM ij gh ykxw gksaxsA vr% bUgsa ;wujs h vkWijsVj dgrs gSaA mnkgj.k %& + + x ;k x + + dk vFkZ x = x + 1 gSA dEI;wVj foKku /112 rFkk - - x ;k x - - dk vFkZ x = x - 1 gSA ;fn vkWijsVj dk iz;ksx pj ls igys djsa rks igys eku c<+sxk fQj vU; lafØ;k gksxhA tcfd vkWijsVj pj ds ckn esa gks rks igys vU; lafØ;k gksxh fQj eku c<+sxkA tSls x = 10 o y = ++x rks y = 11 gksxk tcfd x = 10, y = x++ gks rks y = 10 gksxk 2-4-5 dUMh'kuy vkWijsVj (Conditional Operator) ftl izdkj vU; Hkk"kkvksa esa if - then - else dFku dk iz;ksx fd;k tkrk gSA mlh izdkj dh ifjfLFkfr ds fy, C/C++ Hkk"kk esa "?" ,d daMh'kuy vkWijsVj (Conditional Operator) gSA bldk izk:i fuEu gS& <Condition> ? <if True>: <else>; Rexp1 ? exp2 : exp3; tgka Rexp1, exp2 o exp3 rhuksa dFku gSA ;g vkWijsVj fuEu izdkj dk;Z djsxkA ;fn Rexp1 dFku dk ifj.kke lgh ¼1½ gks rks exp2 dFku lEikfnr gksxkA tcfd Rexp1 dk ifj.kke xyr ¼0½ gks rks exp3 dFku lEikfnr gksxk mnkgj.k ekuk p = 2 q=8 a = (p>q) ? p : q; ;gka Rexp1 vFkkZr p>q gSA bldk ifj.kke xyr ¼0½ gS vr% exp3 vFkkZr~ q dk eku a es laxfz gr gksxkA tks fd 8 gS vr% a pj dk eku 8 gksxkA ;fn Rexp1 vFkkZr~ p>q dk ifj.kke lgh (1) gksrk rks exp2 vFkkZr p dk eku a esa laxzfgr gksxk tks fd 2 gSA vr% pj a dk eku 2 gksxkA fdlh Hkh dFku esa vkWijsVj dh iwoZofrZrk fuEu gSA vkWijsVj iwoZofrZrk ++(post),- - (post) ++(pre),- - (pre),-(unary minus) *,/,% +,<,<=,>,>= ==,!= && || ? : conditional expression) 1 2 3 4 5 6 7 8 9 mnkgj.k ¼1½ ;fn a=2 gS rks C=a*++a ds eku dh x.kuk djksA mÙkj :& vkWijsVj dh iwoZofrZrk ds vuqlkj igys ge ++ x.kuk djsx a s ftlls mldh eku (value) 3 dEI;wVj foKku /113 vk;sxh vc 3 dks 3 ls xq.kk djsax]s ftlls mldk mÙkj 9 vk;sxkA 2-6 vfHkO;fDr (Expressions) vfHkO;fDr dk fuekZ.k vkijsVj] pj (variable) rFkk fu;rkad (constant) dks feykdj fd;k tkrk gSA ;g +, -, *, / dbZ rjg ds gks ldrs gSA ysfdu ge ;gka ij lk/kkj.kr;k nks rjg ds vfHkO;fDr n’kkZrs gaSA (i) vadxf.kr vfHkO;fDr (Arithmetic expression) (ii) rdZlx a r vfHkO;fDr (Logical expression) 2-6-1 v adxf.kr dxf.kr vfHkO;fDr (Arithmetic expression) vadxf.kr vfHkO;fDr os gksrs gS tks +, -, *, / fpUg ds iz;ksx }kjk curs gSA ;gka ij dqN lkFkZd vadxf.kr vfHkO;fDr n’kkZ;s x;s gSA int x, y, z; float p, q, r; rc z/x, x+y, y/z+x, p/r+x-y lkFkZd p%r fujFkZd gS] D;ksfa d % (Modules) fpUg float ds lkFk iz;qDr ugha djrs gaSA 2(3*x+y) fujFkZd gS] D;ksafd 2 vkSj 3 ds chp vkWijsVj ugha gSA mnkgj.k ¼1½ fuEufyf[kr vfHkO;fDr dks mlls lacaf/kr C++ vfHkO;fDr esa fyf[k;s (i) (ii) (iii) d = b2-4ac u + ft (2a + b)2 d = b*b - 4*a*c; u+f*t (2*a+b)*(2*a+b) mRrj 2-6-2 rdZlaxr vfHkO;fDr (Logical expression) a r vfHkO;fDr og vfHkO;fDr ftldk mRrj gka (True) ;k uk (False) esa vkrk gSA rdZlx dgrs gSA dqN lkFkZd mnkgj.k ;gkaW ij fn;s x;s gSA p>q !x>y (p+q)>s (!q) && (r||p) 2-7 dEI;wVj foKku /114 O;atd esa Vkbi dk Lor% ifjorZu (Automatic type Conversion in expression) vius vki ifjofrZr gksus okys Vkbi (Type) os gaS tks (Compiler) dEikbyj }kjk vius vki ifjofrZr gks tkrs gSA mnkgj.k # include <iostream.h> # include <conio.h> void main ( ) { int a=2; char ch = ‘a’; cout <<(a+ch); getch ( ); } mijksDr izkx s kz e (program) dks tc ge dEI;wVj ij ju (Run) djrs gS rks bldk vkmViqV (output) 99 vkrk gS D;ksafd (char) djSDVj vius vki ASCII Vsfcy ds }kjk integer esa ifjofrZr gks tkrk gSA mnkgj.k # include <iostream.h> void main ( ) { int x=7, y; y=x/2; cout <<y; } mijksDr izksxzke dks dEI;wVj ij ju djus ij vkmViqV vkrk gS 3- vxj ge osfj;cy y dks int ls float esa ifjofrZr dj nsrs gSaA vkSj fQj vkmViqV ns[krs gS rks vkmViqV 3-5 vkrk gaS uk fd 3 A vxj ge 3-5 vkmViqV ykuk pkgrs gS rks ge type casting dk iz;ksx djsaxAs 2-8 Vkbi dkfLVax (Type Casting) Vkbi dkfLVax vfHkO;fDr og gksrk gS tks fd fdlh Hkh vfHkO;fDr (expression) dks fof’k"V Vkbi esa ifjofrZr djus ds dke vkrh gSA Vkbi dkfLVax fy[kus dh jpuk bl izdkj gSA (Data Type) Expression mijksDr izksxzke esa vxj ge Vkbi dkfLVax dk iz;ksx djrs gaS rks ifjofrZr izksxkz e bl izdkj n'kkZ;k tk;sxkA # include <iostream.h> # include <conio.h> void main ( ) { int x=7; float y; y=(float) x/2; cout <<y; getch ( ); } dEI;wVj foKku /115 vc ;g izksxkz e 3-5 vkmViqV nsxkA dqN lkFkZd mnkgj.k fuEu izdkj gSA (i) (ii) 2-9 int p = 6; float q; q=(float) p + 5.7; int c; c=(int) 3.5421; C++ 'kkVZ gS.M (C++ Short hands) a = a + b dks ge 'kkVZ gS.M esa a + = b fy[ksaxAs a = a - b dks ge 'kkVZ gS.M esa a - = b fy[ksaxAs a = a * b dks ge 'kkVZ gS.M esa a * = b fy[ksaxAs a = a / b dks ge 'kkVZ gS.M esa a / = b fy[ksaxAs a = a % b dks ge 'kkVZ gS.M esa a % = b fy[ksaxAs vH;kl iz’u oLrqfu"B iz’ u (Obective Type Questions) 1.- dEI;wVj dh eSeksjh ds vanj ¶yksV MkVk Vkbi ysrk gSA ¼v½ 2 ckbV~l ¼c½ 4 ckbV~l ¼l½ 8 ckbV~l ¼n½ mijksä esa ls dksbZ Hkh ugha 2- cSd Lys'k v{kj "\"" dk fo'ks"k vFkZ gksrk gSA ¼v½ dSfjt fjVZu (Carriage Return) ¼c½ gksfjtksaVy BSc (Horizontal Tab) ¼l½ cSd LyS'k (Back Slash) ¼n½ Mcy dksV (Double quote) 3- ykWftdy vkijsVj && vFkZ gksrk gSA ¼v½ ykWftdy NOT ¼c½ ykWftdy OR ¼l½ ykWftdy AND ¼n½ ykWftdy NAND 4- C++ Hkk"kk esa fdrus fjys'kuy vkijsVj gksrs gSA ¼v½ 4 ¼c½ 5 ¼l½ 6 ¼n½ 8 y?kqÙkjkRed iz'u (Short Answer Type Questions) 12- vfHkO;fDr fdrus izdkj dh gksrh gSa \ pjksa dh ?kks"k.kk dEikbyj dks D;k ckrsa crkrh gSA\ dEI;wVj foKku /116 3- pjksa dk uke nsrs le; fdu fu;eksa dk /;ku j[kk tkrk gSSa \ fucU/kkRed (Essay Type Questions) 1- C++ Hkk"kk esa miyC/k izkbujh izdkj ds vkadM+ks ij fuoa/k fyf[k,A 2- C++ Hkk"kk esa miyC/k vkijsVjksa dks mnkgj.k nsdj le>kb, A 3- C++ Hkk"kk esa miyC/k vfHkO;fDr dks le>kb, \ mÙkjekyk 1 ¼c½ 2 ¼n½ 3 ¼l½ 4 ¼l½ dEI;wVj foKku /117 1 fu;=a.k dk izokg (Flow of Control) 1-1 d.Mh'kuy vfHkO;fDr (Conditional expression) d.Mh'kuy vfHkO;fDr og gksrh gS ftldk mRrj gk¡ ;k uk esa vkrk gSA if (expression) dFku 1; else dFku 2; vfHkO;fä \ uk gk¡ bQ CykWd ds vUnj dk dFku ,Yl CykWd ds vUnj dk dFku ;fn vfHkO;fDr dk mRrj gk¡ gksrk gS rks dFku 1 dks fu"ikfnr (Execute) djsxk vU;Fkk dFku 2 dks fu"ikfnr djsxkA mnkgj.k 1 C++ esa ,d izksxzke fy[kks tks fd lsfYl;l rkieku dks QkWjusgkbV esa vkSj QkWjusgkbV rkieku dks lsfYl;l rkieku esa ifjofrZr dj nasA blds fy, izksxkz e dk p;u og ;wtj (User) ls iwNsxkA #include<iostream.h> dEI;wVj foKku /118 # include <conio.h> void main() { int choice; float f,c; cout<<”\n enter 1 for convert Celsius to fahrenheit and 2 for Fahrenheit to Celsius”; cin>>choice; if(choice==1) { cout<<”\n enter temperature in Celsius”; cin>>c; f= (c-32)/1.8; cout<<”\n Fahrenheit=”<<f; } else { cout<<”\n enter temperature in Fahrenheit”; cin>>f; c= (1.8*f)+32; cout<<”\n Celsius=”<<c; } getch ( ); } 1-2 usLVsM bQ (Nested if) usLVsM bQ dFku og gksrk gS ftlesa ,d bQ (if) dFku ds vanj nwljk bQ dFku gksrk gSA bldks ge fuEu izdkj ifjHkkf"kr djsaxAs if (expression 1) { if (expression 2) dFku&1( else dFku&2( } else { if (expression 3) dFku&3( else dFku&4( } dEI;wVj foKku /119 mnkgj.k ,d izkx s kz e fy[kks tks fd rhu la[;k dks ;wtj ls iwNs vkSj lcls cM+h la[;k dks fizVa djsA #include<iostream.h> # include <conio.h> void main() { int a,b,c; cout<<”\n enter the value of a”; cin>>a; cout<<”\n enter the value of b”; cin>>b; cout<<”\n enter the value of c”; cin>>c; if(a>b) { if(a>c) cout<<”\n greatest number is”<<a; else cout<<”\n greatest number is”<<c; } else { if(b>c) cout<<”\n greatest number is”<<b; else cout<<”\n greatest number is”<<c; } getch ( ); } 1-3 fLop & dsl & fMQkYV (switch... case... default) C++ esa ,d ls T;knk dFkuksa esa ls] ,d dk p;u djus ds fy, fLop dFku (switch) dk iz;ksx djrs gSA switch (expression) { case fu;rkad 1 % dFku 1( break; case fu;rkad 2 % dFku 2( break; case fu;rkad 3 % dFku 3( break; default : dFku&4; } dEI;wVj foKku /120 mnkgj.k C++ Hkk"kk esa ,d izkx s kz e fy[kks tks fd lIrkg ds fnu dk uacj ;wtj ls iwNs vkSj fQj lIrkg dk uke fizaV djsA #include<iostream.h> # include <conio.h> void main() { int choice; cout<<”\n enter the number of the weekday”; cin>>choice; switch (choice) { case 1: cout<<”\n Sunday”; break; case 2: cout<<”\n Monday”; break; case 3: cout<<”\n Tuesday”; break; case 4: cout<<”\n Wednesday ”; break; case 5: cout<<”\n Thursday”; break; case 6: cout<<”\n Friday”; break; case 7: cout<<”\n Saturday”; break; default:cout<<”\n you entered wrong choice”; } getch ( ); } 1-4 usLVsM fLop dsl (Nested switch case) ,d fLop dFku nwljs fLop dFku ds vanj gks rks] bl izdkj ds dFku dks usLVsM fLop dsl dgrs gaSA 1-5 cszd dFku (Break Statement) C++ Hkk"kk esa czsd dFku (Break Statement) fdlh Hkh ywi ds chp esa ls ckgj fudkyus dk dk;Z djrk gSA tSls gh czsd (Break Statement) dFku vkrk gSA izksxkz e ds dUVªky s dks ywi ls ckgj fudky nsrk gSA dEI;wVj foKku /121 mnkgj.k : #include<iostream.h> # include <conio.h> void main() { int a=12,i=1; while (0) { if (i==3) { break; } else { p=a*i; i=i+1; cout<<“\n”<<p; } } getch ( ); } output :12 24 djsxkA 1-6 mijksDä izksxzke esa tSls gh i dk eku 3 gksxk Break dFku ds dkj.k ;g vkxs fu"ikfnr ugha ywi (LOOP) ywi lk/kkj.kr;k tc iz;ksx djrs gS] tc fdlh dFku dks ,d ls T;knk ckj nksgjk;k tkuk gksrk gSA ;gka ij rhu izdkj dh ywi (Loops) gksrh gSA (i) Ogkby (while) Mw&Ogkby (do-while) (ii) (iii) QkWj ywi (for loop) 1-7 Ogkby (while) ywi Ogkby ywi dk flUVsDl fuEu izdkj gSA while (Condition) { dFku&1( } ;fn dUMh'ku (Condition) lR; gS rks ;g Ogkby ywi ds vanj tks dFku&1 gSA mldks fu"ikfnr (Execute) djsxkA vkSj ;fn dUMh'ku lR; ugha gS rks ;g ywi ds vanj fy[ks dFku dks fu"ikfnr (Execute) ugha djsxkA Ogkby ywi dks lk/kkj.kr;k ,UVªh dUVªksy ywi (Entry Control loop) dgrs gS D;ksafd blds vanj izos'k djus ds igys ;g 'krZ (Condition) dh tkap djrk gSA dEI;wVj foKku /122 mnkgj.k %& fuEufyf[kr izksxzke dk vkmViqV fy[kksA #include<iostream.h> # include <conio.h> void main() { int a=7; while(a<10) { cout<<”\n”<<a; a=a+1; } getch ( ); } mÙkj % 7 8 9 uk gk¡ dFku 1-8 Mw&Ogkby ywi (do-while loop) Mw Ogkby ywi dks ,fDtDV dUVªky s ywi (Exit Control loop) dgrs gS] D;ksafd ;g 'krZ dh tkap rc djrh gS] tc og ywi ls ckgj fudyrh gSA ;fn dksbZ 'krZ igys ls gh uk (False) gS rks Hkh ;g ywi de ls de ,d ckj rks fu"ikfnr gksxh gh tcfd QkWj ywi (for loop) vkSj Ogkby ywi esa ;fn 'krZ igys ls gh uk (False) gS rks ;g nksuksa ywi ,d Hkh ckj fu"ikfnr ugha gksxhA lk/kkj.kr;k Mw&Ogkby ywi dk iz;ksx rc djrs gS tc gesa ;g ugha irk gS fd ;g ywi fdruh ckj fu"ikfnr gksxhA Mw&Ogkby ywi dk flUVsDl do { dFku&1( dEI;wVj foKku /123 } while (Condition)( dFku gk¡ uk mnkgj.k ,d izksxzke fy[kks tks fd ,d uEcj ds lHkh vadksa dk tksM+ dj nsA ¼;fn ;wtj 3427 uacj nsrk gS rks mldk mRrj 3$4$2$7=16 vk;s½ #include<iostream.h> # include <conio.h> void main() { int n,s=0,d; cout<<”\n enter the number”; cin>>n; do { d=n%10; s=s+d; n= n/10; }while(n!=0); cout<<”\n sum=”<<s; getch ( ); } 1-9 QkWj ywi (for loop) QkWj ywi dk iz;ksx rc fd;k tkrk gS tc ;wtj dks igys ls gh irk gks fd ;g ywi ,d fuf'pr la[;k rd fu"ikfnr gksxhA QkWj ywi dk flUVsDl fuEu gS%& for (initialization; condition; increment) { dFku&1( } dEI;wVj foKku /124 mnkgj.k %& ,d izksxkz e fy[kks tks fd ;wtj }kjk fn;s x;s uEcj rd izk—r la[;kvksa dks fizaV djsA #include<iostream.h> # include <conio.h> void main() { int n,i; cout<<”\n enter the number”; cin>>n; for(i=1;i<=n;i++) { cout<<i; } getch ( ); } mnkgj.k %& ,d izksxzke fy[kks tks fd fdlh Hkh la[;k dk QsDVksfj;y (Factorial) fudkysA QsDVksfj;y n = n(n-1) --------3-2-1 #include<iostream.h> # include <conio.h> void main() { int n,f=1,i; cout<<”\n Enter the number”; cin>>n; for(i=1;i<=n;i++) { f=f*i; } cout<<”\n Factorial=”<<f; getch ( ); } 1-10 usLVsM ywi (Nested loop) tc ,d ywi ds vanj] nwljh ywi gks rks mls usLVsM ywi dgrs gSA fdUrq ,d usLVsM ywi esas] vanj okyh ywi] ckgj okyh ywi ls igys lekIr (Terminate) gksxhA mnkgj.k %& for(int i=1;i<5;i++) { for(int j=1;j<=i;j++) { cout<<j; } cout<<”\n”; } 1 12 123 dEI;wVj foKku /125 1234 vH;kl ds fy, iz’u oLrqfu"B iz’ u (Obective Type Questions) fuEufyf[kr iz’uks esa lgh fodYi dk pquko dhft, 1czsd (break) dFku ckgj fudkyrk gSA ¼v½ dsoy vanj okyh ywi ls ¼c½ dsoy vanj okys fLop(Swith) dFku ls ¼l½ lHkh ywi vkSj fLop ls ¼n½ vanj dh ywi ;k fLop ls 2tc Hkh gesa ;g irk gksrk gS fd ;g ywi ,d fuf’pr la[;k rd fu"ikfnr gksxh rks ge dke esa ysaxAs ¼v½ QkWj ywi (for loop) ¼c½ Mw Ogkby ywi (Do-while) ¼l½ Ogkby ywi (while loop) ¼n½ mijksä esa ls dksbZ ugha 3usLVsM ywi esa igys ywi fu"ikfnr gksrh gSA ¼v½ ckgj okyh ¼c½ vanj okyh ¼l½ nksuksa ,d lkFk ¼n½ dksbZ Hkh ugha 4dbZ lkjh fHkUu&fHkUu ’krksZa esa ls fdlh ,d dk p;u djus ds fy, tks dFku dke esa ysaxAs ¼v½ bQ dFku ¼c½ bQ&bsYl dFku ¼l½ fLop dFku ¼n½ dksbZ Hkh ugha y?kqÙkjkRed iz'u (Short Answer Type Questions) 1ywi dk iz;ksx dc djrs gSa \ 2ywi fdrus izdkj dh gksrh gS \ 3usLVsM ywi D;k gksrh gS \ 4og dkSulh ywi gS ftldk iz;ksx fdlh dFku dks fu’fpr ckj rd fu"ikfnr djus ds fy, fd;k tkrk gS \ fucU/kkRed (Essay Type Questions) 1fdlh la[;k dk igkMk(Table) fizUV djus ds fy, C++ Hkk"kk esa ,d izksxzke fyf[k;sA 2nks os f j;s c yks a ds eku dks fcuk rhljs os f j;s c y ds mi;ks x ds vkil es a cnyus ds fy, izksxzke fyf[k,A 3C++ Hkk"kk es a ,d iz k s x z k e fy[ks tks fdlh uEcj ds va d ks a dk tks M dj fizUV djsaA ekuk uEcj 5246 gS rks vkmViqV 17 gksuk pkfg;sA 4Mw&Ogkby ywi vkSj QkWj ywi esa varj fyf[k;sA crkb;s fd nksuks esa ls dkSulh ywi ,fXtV dUVªky s ywi dgykrh gS\ 5fuEu izksxkz e dk vkmViqV Kkr djks& dEI;wVj foKku /126 # include <iostream.h> # include <conio.h> void main () { int i, s=0; for(i=0;i<=3; i++) { s=s+i; } cout<<"\ns="<<s; cout<<"\ni="<<i; getch ( ); } mÙkjekyk 1- ¼n½ 2- ¼c½] 3- ¼c½] 4- ¼l½] 2 ;wtj fMQkbUM QaD’ku (User defined functions) 2-1 QaD'ku (Function) fdlh Hkh cM+s izksxkz e dks gy djrs le;] ml izksxzke ds chp&chp esa dbZ ckj leku dksM] ,d ls T;knk ckj iz;ksx gksrs gSA bl leku dksM ds ckj&ckj iz;ksx djus ds dkj.k izksxkz e Hkh T;knk yack gks tkrk gSA rFkk mldks le>us esa Hkh leL;k gksrh gSA bl leL;k ds lek/kku ds fy,] og leku dksM tks ,d ls vf/kd ckj iz;ksx gks jgk gSA mldks vyx ls fy[k fn;k tk;sxk rFkk mldk ,d vyx ls uke ns fn;k tk;sxkA bl vyx uke dks ge QaD'ku dk uke (Function name) dgrs gaSA mlds ckn eq[; izksxkz e (Main Program) esa tgka Hkh ml leku dksM dks fy[kus dh t:jr gksxhA ogka ij og leku dksM u fy[kdj] ml QaD'ku dk uke fy[k nsx a As bl rjg ls ;g eq[; izkx s kz e vius vki QaD'ku ds vanj fy[ks dksM dks fu"ikfnr (Execute) dj nsxkA bl izdkj QaD'ku ds iz;ksx ls le;] txg (space) dh cpr gks tkrh gSA vkSj izksxkz e Hkh ljy gks tkrk gSA QaD'ku dks fuEu izdkj ifjHkkf"kr djsax& s Data Type Function name (Parameter list) { body of the function, return value; } QaD'ku dk uke ;wtj }kjk fn;k tk;sxkA iSjkehVj fyLV og fyLV gS tks ;wtj eq[; izksxzke ls mi izksxkz e esa Hkstus ds fy, osfj;cy dke esa ysrk gSA ;s lkjs osfj;cy vxj ,d ls T;knk gS rks buds chp dksek (,) yxk;sx a As fjVuZ (return) dFku ifj.kke dks ;k dksbZ Hkh eku (value) dks mi izksxkz e ls eq[; izksxkz e esa Hkstus ds fy, dke vkrk gSA ,d QaD'ku fcuk iSjkehVj fyLV ds Hkh gks ldrk gSA ml le; nksuksa czsdVs ksa ds chp [kkyh LFkku NksM+ nsxas tks iSjkehVj fy[kus ds dke vkrk gS mnkgj.k ds fy;s ,d QaD'ku fn;k x;k gSA og nks uacj dh rqyuk djds tks Hkh uEcj NksVk gksxk mldks QaD'ku ds }kjk (return) fjVuZ djsxkA int min (int a, int b) dEI;wVj foKku /128 { if (a<b) return a; else return b; } 2-2 QaD'ku izksVksVkbi (Function prototype) ,d QaD'ku izksVksVkbi QaD'ku dh rjg gh gksrk gS tks igys ls gh dEikbyj dks crk nsrk gS fd ge bl izksxkz e esa bl QaD'ku dk iz;ksx djsx a sA ;g QaD'ku bl Vkbi dk eku return djsxkA rFkk blds iSjkehVj tks eq[; izksxkz e ls mi izksxkz e esa tkus ds fy, gS og brus gSA bl izdkj QaD'ku dk iz;ksx djus ls igys gh ge dEikbyj dks crk nsaxAs lk/kkj.kr;k bl izdkj ds QaD'ku dk fMDys;js'ku eq[; izksxkz e ls igys djrs gaSA bl izdkj ds QaD'ku dks lkoZHkkSe izksVksVkbi QaD'ku (global prototype function) dgrs gSaA vkSj ;fn QaD'ku dks dkWy djus ds varxZr fMDys;j djrs gSa rks ml QaD'ku dks LFkkuh; izksVksVkbi QaD'ku (Local Prototype function) dgrs gSA ,d QaD'ku tks fdlh Hkh rjg dk eku fjVuZ ugha djrk gaSA mldks ge (void) okWbM Vkbi fMDys;j djsaxAs 2-3 QaD'ku dks cqykuk (Calling a function) tc fdlh QaD'ku dk eq[; izksxzke esa iz;ksx djrs gSa rks mldks mi izkx s zke ls] eq[; izkx s zke esa cqykus ds fy, tks dksM fy[ks tkrs gaSA mls QaD'ku dks cqykuk dgrs gSA ekuk ,d QaD'ku fuEu izdkj ifjHkkf"kr gSA int max (int x, int y); vc ge bl QaD'ku dks eq[; izksxkz e esa cqykus ds fy, fuEu izdkj ls fy[ksax& s max (x,y); QaD'ku dks cqykus dk fu;e ogh gS tks QaD'ku dks fMDys;j djus dk gSA dsoy rjhdk fHkUu gS rks og MkVk Vkbi dks ugha fy[kus dk gSA #include<iostream.h> # include <conio.h> float interest(float,float,float); void main() { float p,r,t,s; cout<<“\n enter the principle”; cin>>p; cout<<“\n enter the rate”; cin>>r; cout<<“\n enter the time”; dEI;wVj foKku /129 cin>>t; s=interest(p,r,t); cout<<“\n Simple interest=”<<s; getch ( ); } float interest(float p, float r, float t) { float si; si=(p*r*t)/100; return(si); } 2-4 fMQkYV vkjX;wesUV (Default argument) C++ Hkk"kk esa fMQkYV vkjX;weUs V dk iz;ksx gksrk gSA ;g lk/kkj.kr;k tc T;knk egRo j[krk gSA tc iz;ksx djus okyk] fdlh iSjkehVj dk eku ugha Hkstrk vkSj QaD'ku dks cqyk ysrk gSA (calling) mnkgj.k%& ,d QaD'ku C;kt dk x.kuk djus ds fy, fy[kk x;k gSA float interest (float p, float r, float t=3); bl mijksDr QaD'ku esa le; dk fMQkYV eku 3 fn;k x;k gSA blds ckn tc ge QaD'ku dks cqykrs (call) gS vkSj ekuk bl izdkj fy[krs gSA Si = interest (2000, .3) rks ;g QaD'ku ewy/ku dk eku rks 2000 Hkst nsxkA C;kt dh nj -3 Hkst nsxk vkSj D;ksafd le; dk eku ugha Hkstk gSA rks og vius vki gh 3 ys ysxkA tks fd fMQkYV iSjkehVj esa igys ls gh j[kh gqbZ gSA dksbZ Hkh vkjX;weUs V rc rd fMQkYV osY;w ugha ysxk] tc rd bldk vkxs okyk pj eku ugha ysxkA ;gka ij dqN lgh vkSj xyr mnkgj.k fMQkYV vkjX;weUs V ds crk;s x;s gS& float interest (float p, float r = .3, float t = 3) lgh float interest (float p = 3000, float r, float t = 3) xyr float interest (float p = 4000, float r = .3, float t ) xyr float interest (float p, float r, float t = 3) lgh 2-5 fuf'pr vkjX;wesUV (constant argument) fuf'pr vkjX;weUs V ds vanj vkjX;we.s V dk eku fuf'pr jgrk gS] ml eku dks ge ifjofrZr ugha dj ldrsA mnkgj.k ds fy, geus ,d QaD'ku area dks cqyk;k (calling) area (10); bl QaD'ku esa vkjX;weUS V dk eku 10 gS tks fd fuf'pr gSA ge bl mijksDr QaD'ku dks bl rjg ls fy[k nsrs gSA dEI;wVj foKku /130 area (r); rks ;gka ij r ,d osfj;cy gSA bldh dksbZ Hkh eku gks ldrk gSA vkSj vxj bl r ds eku dks Hkh fuf'pr djuk gS rks ge u;k QaD'ku fuEu izdkj fy[ksaxAs int multiply (const int a, const int b); bl QaD'ku esa const iz;ksx fd;k x;k gSA bldk eryc ;g vkjX;weUS V dk eku fuf'pr gSA vc ge blds eku dks ifjofrZr ugha dj ldrsA ,d QaD'ku nks rjhds ls cqyk (call) ldrs gSA (i) dky okbZ osY;w (Call by value) (ii) dky okbZ jsQjsUl (Call by reference) 2-6 dky ckbZ osY;w (Call by value) blesa okLrfod (Actual) iSjkehVj dks vkSipkfjd (formal) iSjkehVj esa ifjofrZr dj nsrs gSA ifjofrZr djus ds ckn ;wtj ;fn vkSipkfjd (formal) iSjkehVj esa dksbZ ifjorZu djrk gS rks og okLrfod (Actual) iSjkehVj esa ykxw ugha gksrk gSA bl izdkj bl rjg dh rduhd esa ge eq[; izksxkz e ls mi izksxkz e esa iSjkehVj ds }kjk eku Hkst nsrs gSA vkSj ml mi izksxkz e ds varxZr ;fn iSjkehVj esa dksbZ ifjorZu gks tkrk gS] ;k dj fn;k tkrk gSA rks eq[; izksxzke esa ftl iSjkehVj ls mldks Hkstk Fkk] mlesa ifjorZu ugha gksxkA mnkgj.k %& #include<iostream.h> void change(int a, int b); void main() { int x=2,y=3; change(x,y); cout<<”\n x=”<<x<<”\n y=”<<y; } void change (int a, int b) { a=a+5; b=b-2; cout<<”\n a=”<<a<<”\nb=”<<b; } bl izksxkz e dk mRrj fuEu vk;sxk& a=7 b=1 x=2 y=3 bl izksxkz e esa eq[; izkx s zke es tks iSjkehVj x vkSj y Fks mudk eku mi izksxkz e ds iSjkehVj a vkSj b esa ifjofrZr gks x;k] ftlls mi izkx s kz e esa a vkSj b dk eku 2 vkSj 3 mlds ckn a dk eku gksxk dEI;wVj foKku /131 7 vkSj b dk eku gksxk 1 fQj ;g a vkSj b ds eku dks fizaV dj nsxkA mlds ckn dUVªksy eq[; izksxkz e esa vk;sxkA eq[; izksxkz e esa x vkSj y dk eku ogh jgsxk tks igys Fkk] ;kfu 2 vkSj 3- 2-7 dky ckbZ jsQjsUl (Call by reference) tc ge QaD'ku dks cqykrs gS rks dky ckbZ jsQjsUl esa okLrfod (Actual) iSjkehVj dks vkSipkfjd (formal) iSjkehVj esa ifjofrZr dj nsrs gSA ifjofrZr djus ds ckn ;fn mi izksxkz e esa vkSipkfjd (formal) iSjkehVj esa dksbZ ifjorZu djrs gS rks mldk izHkko okLrfod (Actual) iSjkehVj ij Hkh iM+rk gSA ftlls okLrfod (Actual) iSjkehVj Hkh ifjofrZr gks tkrs gSA bl rjg dh jsQjsfUlax esa okLrfod (Actual) iSjkehVj vkSj vkSipkfjd (formal) iSjkehVj dk uke eseksjh ds vanj ,d gh gksrk gSA ftlls ;fn ge okLrfod (Actual) iSjkehVj dks ifjofrZr djsaxs rks og vkSipkfjd (formal) iSjkehVj esa Hkh ifjorZu dj nsxkA vkSj ;fn ge vkSipkfjd (formal) iSjkehVj esa ifjorZu djrs gS rks og okLrfod (Actual) iSjkehVj esa Hkh ifjorZu dj nsxkA dky ckbZ jsQjsUl cukus ds fy, ge osfj;cy ds igys & ¼,EijlUM½ dk fpUg yxk nsaxAs mnkgj.k %& void change (int & a, int b) ;gka osfj;cy a dkWy ckbZ jsQjsUl gS] tcfd osfj;cy b dkWy ck; osY;w gSA mnkgj.k %& #include<iostream.h> void change(int& a, int& b); void main() { int x=2,y=3; change(x,y); cout<<”\n x=”<<x<<”\n y=”<<y; } void change (int & a, int & b) { a=a+5; b=b-2; cout<<”\n a=”<<a<<”\nb=”<<b; } bl izksxzke dk ifj.kke fuEu vk;sxk& a=7 b=1 x=7 y=1 bl izksxkz e esa (Actual) iSjkehVj dk eku eq[; izksxzke esa 2 vkSj 3 gS tks fd ifjofrZr gksdj mi izksxkz e ds iSjkehVj (formal) esa ifjofrZr gks x;kA vc mi izksxkz e ds varxZr iSjkehVj a vkSj b dEI;wVj foKku /132 dk eku 7 vkSj 1 gks x;kA blds izHkko ls eq[; izksxzke esa Hkh osfj;cy x vkSj y dk eku 7 vkSj 1 gks x;kA mnkgj.k %& C++ Hkk"kk esa ,d izksxzke fy[kks tks lehdj.k ax2+bx+c=0 ds ewy fudkysA #include<iostream.h> #include<math.h> # include <conio.h> void roots(int,int,int,float& x3,float& x4); void main() { int a,b,c; float root1,root2; cout<<“\n enter the coeff. of x2”; cin>>a; cout<<“\n enter the coeff of x”; cin>>b; cout<<“\n enter constant term”; cin>>c; roots(a,b,c,root1,root2); cout<<“\n root1=”<<root1; cout<<“\n root2=”<<root2; getch ( ); } void roots(int a, int b, int c, float& x1,float& x2) { int d; d= b*b-4*a*c; if(d>=0) { x1=(-b+sqrt(d))/(2*a); x2=(-b-sqrt(d))/(2*a); } else cout<<“\n roots are not real”; } 2-8 QaD'ku ds }kjk Hkstk x;k eku (Returning Value from a function) ,d QaD'ku ges'kk ,d gh izdkj dk eku Hkstrk gSA ysfdu vxj QaD'ku okbM (void) Vkbi dk fMDys;j gS rks ;g t:jh ugha gS fd og ,d Hkh izdkj dk eku HkstAs ;kfu QaD'ku dksbZ Hkh eku ugha Hkstrk gSA QaD'ku ds }kjk tks Hkh eku Hkstk tkrk gSA og fuEu izdkj ds gks ldrs gSA (i) okbM (void) (ii) (iii) int float dEI;wVj foKku /133 (iv) char void dk mnkgj.k& void change ( ) { ____; ____; } 2-9 QaD'ku ds }kjk ,js dks cqykuk (Calling function with arrays) tc Hkh ge ,js dks QaD'ku ds }kjk eq[; izksxkz e ls mi izksxkz e esa Hkstrs gaS rks ge ,js ds izFke vo;o dk irk (Address)] ikbUVj (Pointer) ds }kjk Hkstrs gSa u fd lkjk ,jsA ftlls dEikbyj vius vki ,js ds ckdh vo;oksa ds irs dh x.kuk Lo;a dj ysrk gS] vkSj eku Hkh irk dj ysrk gSA mnkgj.k %& dbZ fo|kfFkZ;ksa dh vkSlr vk;q fudkyus dk izksxkz e fy[kks\ mRrj %& #include<iostream.h> # include <conio.h> float average( int marks[20], int n); void main() { int marks[20],i,n; float av; cout<<”\n how many students”; cin>>n; for(i=0;i<n;i++) { cout<<”\n enter the marks of student”<<(i+1); cin>>marks[i]; } av=average(marks,n); cout<<”\n average marks”<<av; getch ( ); } float average(int marks[20], int n) { float s=0,a; for(int i=0;i<n;i++) { s= s+marks[i]; } a=s/n; return a; dEI;wVj foKku /134 } 2-10 QaD'ku vkSj osfj;cy dk ifj{ks= (Scope rule of function & variable) pkj rjg dk ifj{ks= (Scope) C++ esa QaD'ku dk vkrk gSA og gS LFkkuh; (Local), Function, Qkby (File) vkSj Dykl (Class) 2-10-1 LFkkuh; ifj{ks= (Local Scope) tks Hkh dksbZ osfj;cy fdlh CykWd esa fMDys;j djsx a As rc og osfj;cy vkSj QaD'ku ml Cykd dk LFkkuh; QaD'ku vkSj osfj;cy dgyk;sxkA 2-10-2 QaD'ku ifj{ks= (Function Scope) vxj dksbZ osfj;cy fdlh QaD'ku ds vanj fMDys;j djsxk rks mldk tks nk;jk gksxk og ml QaD'ku ds vanj gh gksxkA vkSj mldks ml QaD'ku ds vanj gh iz;ksx dj ldrs gSA 2-10-3 Qkby ifj{ks= (File Scope) vxj dksbZ osfj;cy QaD'ku vkSj Cykad ds ckgj fMDys;j fd;k tk;s vkSj bldk iz;ksx CykWd vkSj QaD'ku esa dgha Hkh fd;k tk;s 2-10-4 Dykl ifj{ks= (Class Scope) vxj dksbZ osfj;cy Dykl ds vanj fMDys;j fd;k tkrk gS rks mldk iz;ksx mlh Dykl ds vUrxZr gksrk gSA vr% mls Dykl ifj{ks= (Class Scope) dgsaxAs # include <iostream.h> int p,q; Qkby ifj{ks= char ch; void main ( ) { LFkkuh; ifj{ks= int a, b; void print ( ) { int x; QaD'ku ifj{ks= } void print ( ) { int q; } } dEI;wVj foKku /135 2-11 LFkkuh; vkSj lkoZHkkSe osfj;cy (Local & global variable) & LFkkuh; osfj;cy og gS ftldk iz;ksx mlh CykWd ;k 2-11-1 LFkkuh; osfj;cy (Local)& QaD'ku esa fd;k tkrk gSA bl osfj;cy dks ge ml mnkgj.k #include<iostream.h> void main() { int a=12; cout<<a; } mijksDr mnkgj.k esa osfj;cy a ml CykWd ds fy, LFkkuh; gSA ftldks fd ge dsoy Main izksxkz e esa iz;ksx dj ldrs gSA 2-11-2 lkoZHkkSe osfj;cy (Global) lkoZHkkSe osfj;cy og gS] ftldks ge izksxzke ds vanj dgh Hkh iz;ksx dj ldrs gSA ;kfu bl osfj;cy dks ge QaD'ku] CykWd ;k dgha Hkh iz;ksx dj ldrs gSA blfy, bl rjg ds osfj;cy dks lkoZHkkSe osfj;cy (Global) dgrs gSA mnkgj.k %& #include<iostream.h> int a=10; void main() { cout<<a; } mijksDr mnkgj.k esa tks osfj;cy a n'kkZ;k x;k gSA og lkoZHkkSe osfj;cy gSA ftldks fd eq[; izksxkz e esa Hkh iz;ksx dj ldrs gS vkSj QaD'ku ds vanj Hkh iz;ksx dj ldrs gSA dbZ ckj tc LFkkuh; (Local) vkSj lkoZHkkSe (Global) osfj;cy ges'kk QaD'ku ds vanj Nqik gksrk gSA ftlls fd mldk iz;ksx QaD'ku ds vUnj djus ij LFkkuh; osfj;cy gh fizaV gksxk u fd lkoZHkkSe osfj;cyA fuEu mnkgj.k fn;k x;k gSA #include<iostream.h> # include <conio.h> int x=35; void main() { int x=40; cout<<x; getch ( ); } mijksDr izksxzke dk ifj.kke dEI;wVj ij 40 feysxkA #include<iostream.h> # include <conio.h> int x=35; void main() { int x=40; cout<<”\n Global value of x=”<<::x; dEI;wVj foKku /136 cout<<”\n Local value of x=”<<x; getch ( ); } It will give the out put Global value of x=35 Local value of x=40 vH;kl iz’u oLrqfu"B iz’ u (Obective Type Questions) fuEufyf[kr iz’uksa esa lgh fodYi dk pquko dhft, 1- ,d QaD’ku MsVk Vkbi tks fdlh Hkh izdkj dk eku fjVuZ ugha djrk gSA ¼v½ b.V Vkbi ¼c½ void ¼l½ ¶yksV ¼n½ Mcy 2- QaD’ku dks cukus ls Qk;nk gSA ¼v½ le; dh cpr ¼c½ txg dh cpr ¼l½ le; vkSj txg dh cpr ¼n½ mijksä esa ls dksbZ Hkh ugha 3- fdlh Hkh osfj;cy dks dky okbZ jsQjsUl cukus ds fy, osfj;oy ds uke ls iwoZ fpUg tksMrs gSaA ¼c½ & ¼v½ # ¼l½ ? ¼n½ mijksä esa ls dksbZ ugha 4- tc yksdy osfj;cy o lkoZHkkSe osfj;cy dk uke ,d gks rks lkoZHkkSe osfj;cy dks yksdy osfj;cy ls vyx fn;kus ds fy,s fpUg iz;qDr djsaxAs ¼c½ ; ¼v½ :: ¼l½ : ¼n½ mijksä esa ls dksbZ ugha y?kqÙkjkRed iz'u (Short Answer Type Questions) 1- QaD’ku D;k gksrk gS \ 2- LFkkuh; o lkoZHkkSfed osfj;oy esa ls fdldk ifj{ks= T;knk gksrk gS \ 3- fdlh Hkh fLVªx a dks fjVuZ djus ds fy, QaD’ku dk dkSulk Vkbi iz;qä fd;k tkrk gS \ 4- QaD'ku ds Vkbi fdrus izdkj ds gksrs gS \ 5- QaD'ku izksVksVkbi D;k gksrk gS \ dEI;wVj foKku /137 fucU/kkRed (Essay Type Questions) 1- dky ckbZ osY;w o dky ckbZ jsQjsUl esa vUrj fyf[k;sA 2- C++ Hkk"kk esa lk/kkj.k C;kt dh x.kuk djus dk izksxkz e QaD’ku ds }kjk cukvksA 3- lkekU; vkSj lkoZHkkSe osfj;cyksa esa vUrj fyf[k;sA 4- C++ Hkk"kk esa ,d izksxzke fy[kks tks fd fdlh f}?kkr lehdj.k ds ewy fudkysA 5- C++ Hkk"kk esa ,d izkx s zke fyf[k;s tks NCr dk eku fudkysA ¼NCr=n dk QsDVksfj;y@r dk QsDVksfj;y (n-r) dk QsDVksfj;y½ mÙkjekyk 1- ¼c½ 2- ¼l½] 3- ¼c½] 4- ¼v½ 3 ,js ,oe~ LVªdpj (Array and Structure) ,js ,d gh izdkj ds MkVk lewg dks dgrs gaSA ;s MkVk izdkj fdlh Hkh izkFkfed izdkj tSls int, float, char vkfn ds vFkok ;wtj }kjk fMQkbu izdkj ds gks ldrs gSA bu dk iz;ksx structure o object ds vUnj Hkh fd;k tk ldrk gSA 3-1 ,js dh vko';drk (Need for array) ge ml fLFkfr ds ckjs esa lksps] tc gesa dgk tk;s fd ,d izksxzke fy[kks tks fd 30 fo|kfFkZ;ksa dh mez dks ;wtj ls iwNs vkSj fQj mudh vkSlr vk;q fudkysA vxj ge bl izksxzke dks fcuk ,js ds gy djs rks gesa 30 osfj;cy rks 30 fo|kfFkZ;ksa dh mez dks j[kus ds fy, o ,d osfj;cy mudh vkSlr vk;q ;kfu dqy 31 osfj;cy dh vko';drk gSA bu 31 osfj;cyksa dk uke Hkh vyx&vyx gksxkA vc bu 31 osfj;cyksa (variable) dks izksxzke ds vanj fMdys;j (Declare) djuk cgqr cM+h leL;k gks tkosxhA rFkk le; Hkh T;knk yxsxkA ysfdu ;fn ge ,js dk iz;ksx djsaxs] tSls age[30]] rc ;g 30 osfj;cy vius vki gh age[0]ls age [29] uke ls tkus tk;saxsA vkSj izksxzke dks Hkh ljy cuk nsaxsA 3-2 ,js ds izdkj (Types of array) (i) (ii) ,js fuEu izdkj ds gksrs gaSA ,d foeh; ,js (one dimensional array) f} foeh; ,js (Two dimensional array) 3-3 ,js fMDysjs'ku (Array Declaration) ,js dks ,d uke ls fMDys;j djrs gaSA vkSj blds vo;oksa dks mlds lofLØIV (Subscript) }kjk iz;ksx djrs gaSA dEI;wVj foKku /139 lk/kkj.kr;k ,js dks fuEu izdkj ifjHkkf"kr djrs gSaA Data Type array name [size]; ;gka ij Data Type dk eryc ,js dk MkVk Vkbi] array name - ,js uke ;wtj }kjk fn;k tk;sxkA Size - la[;k tks fd mlds vo;oksa dh la[;k n'kkZrk gSA vkSj vo;oksa dh la[;k ge integer esa nsaxs u fd float esaA mnkgj.k %& int age [30]( float Marks [50]( 3-4 ,d foeh; ,js esa izkjafHkd eku j[kuk (Array Initialization of one dimensional array) ,d foeh; ,js dh izkjafHkd eku mlh rjg j[kh tk,xh] ftl rjg nwljs osfj;cy dk eku j[kk tkrk gSA ysfdu ,js dk eku { } cszdVs ds vanj j[kk tkrk gaSA ekuk fd vki 5 fo|kfFkZ;ksa dh izkjafHkd vk;q ,js esa j[kuk pkgrs gS] rks mlds fy, dEI;wVj esa fy[ksaxs int age [5] = {16, 17, 19, 18, 15}; ;g fuEu izdkj vius vki ,js ls lacaf/kr osfj;cy esa eku j[k nsxkA age [0] = 16 age [1] = 17 age [2] = 19 age [3] = 18 age [4] = 15 3-5 ,js vo;oksa dk ifjpkyu (Manipulations of array element) 3-5-1 tksM+uk %& igys ls gh O;ofLFkr ,js ds vanj u;k MkVk dks O;ofLFkr txg ij tksMu+ s dks ,js ds vanj tksM+uk dgrs gSA fuEufyf[kr fp= esa ,d ,js n'kkZ;k x;k gSA vc ge blesa ,d MkVk 35 tks fd vius O;ofLFkr LFkku ij tksM+uk pkgrs gSA mlds fy, ge igys og fLFkfr dk irk djsax]s tgka ij ;g u;k MkVk tksMu+ k gSA mlds ckn mlds vkxs ds lkjs vo;o ,d fLFkfr vkxs f[kldsax]s ftlls og dEI;wVj foKku /140 LFkku tgka u;k MkVk fjDr gks tk;sxk vkSj mlds ckn ml fjDr LFkku ij u;k MkVk tqM+ tk,xkA 0 10 0 10 0 10 1 12 1 12 1 12 2 21 2 21 2 21 3 25 3 25 3 25 4 31 4 31 4 31 5 39 5 5 35 6 43 6 39 6 39 7 8 9 45 50 7 8 9 43 45 50 7 8 9 43 45 50 mnkgj.k %& fdlh ,js ds vUnj MkVk dks tksM+us dk izksxzke C++ Hkk"kk esa fy[ksaA #include<iostream.h> # include <conio.h> int findpos(int [],int,int); void main() { int a[10],data,n,p; cout<<”\n how many number”; cin>>n; for(int i=0;i<n;i++) { cout<<”\n enter a”<<(i+1); cin>>a[i]; } cout<<”\n enter the data which to be inserted”; cin>>data; p=findpos(a,n,data); for(i=n;i>p;i++) dEI;wVj foKku /141 { a[i]=a[i-1]; } a[p]=data; n= n+1; cout<<”\n The array now is as:\n”; for(i=0;i<n;i++) cout<<a[i]<<” “; cout<<”\n”; } int findpos(int a[], int n, int data) { int pos; if(data < a[0]) pos=0; else { for (int i=0;i<n-1;i++) { if(a[i] <= data && data < a[i+1]) { pos=i+1; break; } } if(i==n-1) pos=n; } return pos; } 3-5-2 foyksiu (Deletion) %& ,d ,js vo;o dks igys ls lqO;ofLFkr ,js esa ls gVkus dks ,js vo;o dk foyksiu dgrs gSA fuEufyf[kr fp= esa ,d ,js ds lkjs vo;o n'kkZ;s x;s gSA mlesa ls ,js vo;o 22 dks gVkuk gSA 22 dks gVkus ds ckn mlds nks vo;o ftudk eku 25 vkSj 30 gSA ,d&,d vo;o Åij f[kldsx a ]s ftlls og fjDr LFkku dks xzg.k dj ysxkA dEI;wVj foKku /142 0 5 0 5 0 5 1 7 1 7 1 7 2 12 2 12 2 12 3 13 3 13 3 13 4 18 4 18 4 18 5 19 5 19 5 19 6 21 6 21 6 21 7 22 7 7 25 8 25 8 25 8 30 9 30 9 30 9 mnkgj.k %& ,d ,js esa ls ,d vo;o dks gVkus dk izksxkz e fy[kks\ #include<iostream.h> void main() { int a[10],data,n,p; cout<<“\n how many number”; cin>>n; for(int i=0;i<n;i++) { cout<<“\n enter a”<<(i+1); cin>>a[i]; } cout<<“\n enter the data which to be deleted”; cin>>data; for(i=0;i<n;i++) { if (a[i]==data) { p=i; break; dEI;wVj foKku /143 } } for(i=p;i<n;i++) { a[i]=a[i+1]; } for(i=0;i<n-1;i++) { cout<<“\n”<<a[i]; } cout<<”\n The array now is as:\n”; for(i=0;i<n;i++) cout<<a[i]<<” “; cout<<”\n”; getch ( ); } 3-5-3 vkSlr (Average of array elements) vkSlr fudkyus ds fy, lkjs ,js vo;oksa ds eku dks tksMd + j mls mrus gh vo;oksa ls Hkkx nsus ij tks la[;k vk;sxh mls ,js dk vkSlr dgrs gSaA #include<iostream.h> # include <conio.h> void main() { int age[30]; int i,n; float av, s=0; cout<<”\n how many students but not more than 30”; cin>>n; for(i=0;i<n;i++) { cout<<”\nenter the age of student “<<(i+1); cin>>age[i]; s= s + ageIi]; } av= s/n; cout<<”\n average age=”<<av; getch ( ); } vkmViqV dk uewuk % How many students but not more than 30 5 enter the age of student 1 11 enter the age of student 2 12 enter the age of student 3 16 enter the age of student 4 17 enter the age of student 5 18 average age=14.8 dEI;wVj foKku /144 3-5-4 js[kh; lpZ (Linear Searching) %& fdlh ,d fn;s gq, ,js es]a fdlh vo;o dk irk djus dks lfpZx a dgrs gSaA ;fn MkVk ml ,js dh lkj.kh esa fey tkrk gS] rks dEI;wVj mRrj nsxk fd MkVk fey x;k] vU;Fkk MkVk ugha feykA bl izksxkz e ds fy, ge ,d owfy;u osfj;cy (Boolean Variable) ysaxAs mlds izkjafHkd eku dks ge 0 dj nsx a sA bldk eryc og vo;o ml lkj.kh esa ugha gS] ;g ge ekusaxAs vkSj tSls gh MkVk ml lkj.kh esa fey tk;sxkA owfy;u osfj;cy dk eku 1 gks tk;sxk bldk eryc og MkVk bl lkj.kh esa miyC/k gSA #include<iostream.h> # include <conio.h> void main() { int age[30],i,data,n, flag=0; cout<<”\n how many data”; cin>>n; for(i=0;i<n;i++) { cout<<”\n enter the age of student”<<(i+1); cin>>age[i]; } cout<<”\n enter the age which to be found in the list”; cin>>data; for(i=0;i<n;i++) { if(age[i]==data) { flag=1; break; } } if(flag==1) cout<<”\n the given age in the list”; else cout<<”\n the given age is not in the list”; getch ( ); } 3-5-5 vf/kdre vkSj U;wure eku fudkyuk (Finding maximum/minimum value) mnkgj.k %& fdlh ,js ds vUnj vf/kdre vkSj U;wure eku fudkyus dk izksxzke fyf[k;sA #include<iostream.h> #include<stdio.h> # include <conio.h> void main() { int n,max,min,i,marks[30]; dEI;wVj foKku /145 cout<<”\n how many marks you enter”; cin>>n; for(i=0;i<n;i++) { cout<<”\n enter the marks of student”<<(i+1); cin>>marks[i]; } max=marks[0]; min=marks[0]; for(i=1;i<n;i++) { if(marks[i] > max ) max=marks[i]; if(marks[i] < min ) min=marks[i]; } cout<<”\n Maximum marks”<<max; cout<<”\n Minimum marks”<<min; getch ( ); } 3-6 fLVªax dks fMDys;j djuk (Declaration of String) C++ Hkk"kk esa dksbZ Hkh fLVªx a MkVk Vkbi ugha gSA ftldk dh lh/kk iz;ksx fd;k tk ldsA blfy, fLVªx a ds fMDys;j djus ds fy, ge djSDVj dk ,js fMDys;j djsx a s ftldk fd vafre djSDVj '\0' [kkyh djSDVj (Null character) gksA tc Hkh ge fLVªx a fMDys;j djsaxs rks ml djSDVj ds ,js dh la[;k ges'kk ftrus fLVªax ds vanj djSDVj gaSA mlls ,d T;knk fMDys;j djsax]s ftlls fd mldk vafre djSDVj ml ,js ds vafre vo;o esa LVksj gks tk;sA ;fn gesa ,d fLVªax fMDys;j djuh gSA ftlds djSDVj dh la[;k 20 gS rks mls fuEu izdkj ls fMDys;j djsaxAs char Name [21]; mnkgj.k %& C++ Hkk"kk esa ,d izksxzke fy[kks tks fd ,d fLVªx a myVk vkSj lh/kk i<+us ij] ,d gh fLVªx a i<+h tk;sA ¼mnkgj.k ey;kye] ljl vkfn½ #include<iostream.h> # include <conio.h> #include<string.h> #include<stdio.h> void main() { char s[20]; int i,j,n,flag=1; cout<<“\n enter string”; gets(s); n=strlen(s); for(i=0,j= n-1; ((i<= n/2) && (j>= n/2));i++,j—) dEI;wVj foKku /146 { if (s[i]!=s[j]) flag=0; break; } if(flag==1) cout<<“\n string is palindrome”; else cout<<“\n string is not palindrome”; getch ( ); } 3-7 fLVªax dk izkjafHkd eku (Initialization of string) dbZ ckj tc ge fLVªx a dk eku ;wtj ls ugha iwNuk pkgrs gSa vkSj lh/ks gh izkx s kz e esa ge mldk izkjafHkd eku j[kuk pkgrs gaSA mlds fy;s ge izksxzke esa fuEu izdkj fy[ksaxAs char name [20] = "prateek" mijksDr fMDyjs'ku vius vki gh ,js dk eku fuEu izdkj j[k nsxkA name [0] name [1] name [2] name [3] name [4] name [5] name [6] name [7] = 'p' = 'r' = 'a' = 't' = 'e' = 'e' = 'k' = '\0' dEikbyj vius vki gh vafre djSDVj dks uy djSDVj (Null character) ls tksM+ nsrk gSA 3-8 fLVªax esa Loj o O;atuksa dh x.kuk djuk (Counting Vowels/Consonants/digit/special characters) ,d fLVªx a nh gqbZ gSA mlesa vki Lojksa dh x.kuk djuk pkgrs gSA rks mlds fy, ge fLVªax ,js ds izR;sd vo;o dh rqyuk Lojksa (a, e, i, o, u, A, E, I, O, U) ls djsx a sA vkSj vxj Loj fey tkrs gS rks ge igys ls gh fMDys;j dkm.Vj osfj;cy (Counter variable) dk eku c<+k nsx a s tks fd Lojksa dh x.kuk djrk gSA ;fn ml fLVªax esa Loj ugha feyrk gS rks] nwljk dkm.Vj osfj;cy (Counter variable) tks O;atu dh x.kuk djrk gSA mldk eku c<+ tkrk gSA bl izdkj ge ,d izksxkz e ds }kjk fLVªx a esa Loj o O;atu dh x.kuk djrs gSaA mnkgj.k %& ,d fLVªax ds vUnj Loj o O;atuksa dh x.kuk djus dk izksxkz e fyf[k;sA #include<iostream.h> #include<stdio.h> #include<string.h> # include <conio.h> void main() { dEI;wVj foKku /147 char st[80]; int i,n,v=0,c=0; cout<<“\n enter the string”; gets(st); n=strlen(st); for(i=0;i<n;i++) { switch(st[i]) { case ‘a’ : case ‘A’ : case ‘e’ : case ‘E’ : case ‘i’ : case ‘I’ : case ‘o’ : case ‘O’ : case ‘u’ : case ‘U’ : ++v; break; default: ++c; } } cout<<“\n number of vowels”<<v; cout<<“\n number of consonants”<<c; getch ( ); } 3-9 bt,yue (isalnum) bt,yue(isalnum) QaD'ku ctype.h Qkby esa miyC/k gSA bl QaD'ku (Function) dk dk;Z ,d djSDVj dh ;g tkap djrk gS fd og djSDVj ,YQkcsV vkSj uacj gS ;k ugha gSA ,YQkcsV dk eku A ls Z ;k a ls z rd rFkk uacj dk eku 0 ls 9 rd gks ldrk gSA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a character”; ch=getchar(); if (isalnum(ch)) cout<<“\n the character is alphanumeric”; else cout<<“\n no alphanumeric”; dEI;wVj foKku /148 } 3-10 bt,YQk (isalpha) ;g QaD'ku Hkh isalnum dh rjg gS ysfdu ;g QaD'ku fdlh fn, gq, djSDVj dh tkap djrk gS fd og ,YQkcsV (alphabet) gS ;k ughaA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a character”; ch=getchar(); if (isalpha(ch)) cout<<“\n the character is alphabet”; else cout<<“\n the character is not alphabet”; getch ( ); } 3-11 btfMthV (isdigit) ;g QaD'ku Hkh ctype.h gSMj Qkby esa miyC/k gSA bl QaD'ku dk dke fdlh djSDVj dks ;g irk djuk gS fd og djSDVj uacj gS ;k ughaA uacj dk eku 0 ls 9 rd gksrk gSA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a character”; ch=getchar(); if (isdigit(ch)) cout<<“\n the character is digit”; else cout<<“\n the character is not digit”; getch ( ); } 3-12 btyksoj (islower) ;g QaD'ku Ctype.h gSMj Qkby esa miyC/k gSA bldk dke ,d djSDVj dh ;g tkap djuk gS fd og djSDVj NksVs djSDVj (a-z) esa gS ;k ughaA #include<iostream.h> #include<ctype.h> dEI;wVj foKku /149 #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a character”; ch=getchar(); if (islower(ch)) cout<<“\n the character is in lower case”; else cout<<“\n the character is not in lower case”; getch ( ); } 3-13 btvij (isupper) ;g QaD'ku Hkh btyksoj dh rjg gSA ysfdu ;g djSDVj dh tkap djrk gS fd djSDVj cM+s djSDVj (A-Z) esa gS ;k ughaA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a character”; ch=getchar(); if (isupper(ch)) cout<<“\n the character is in upper case”; else cout<<“\n the character is not in upper case”; getch ( ); } 3-14 Vw yksoj (tolower) bl QaD'ku dk dke cMs djSDVjksa dks NksVs djSDVjksa (small character) esa ifjofrZr djuk gSA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter an upper case character”; ch=getchar(); if (isalpha(ch)) if(isupper(ch)) dEI;wVj foKku /150 { cout<<“\n the character is in lower case is”; putchar(tolower(ch)); } else cout<<“\n The character is not an upper case”; else cout<<“\n the character is not alphabet”; getch ( ); } 3-15 Vw vij (toupper) ;g QaD'ku Hkh ctype.h gSMj Qkby esa miyC/k gS rFkk bldk dke NksVs djSDVjksa dks cM+s djSDVjksa esa ifjofrZr djuk gSA #include<iostream.h> #include<ctype.h> #include<stdio.h> # include <conio.h> void main() { int ch; cout<<“\n enter a lower case character”; ch=getchar(); if (isalpha(ch)) if(islower(ch)) { cout<<“\n the character is in upper case is”; putchar(toupper(ch)); } else cout<<“\n The character is not a lower case”; else cout<<“\n the character is not alphabet”; getch ( ); } 3-16 ,lVhvkj dkWih (strcpy) bl QaD'ku dk dke ,d fLVªx a dks nwljs fLVªx a esa dkWih djuk gSA bldk izk:i bl izdkj gSA strcpy (destination, source) ;gka ij destination og fLVªax gS ftlds vanj dkWih djuk gSA rFkk source og fLVªax gS ftldks fd dkWih djuk gSA #include<iostream.h> #include<ctype.h> dEI;wVj foKku /151 #include<stdio.h> #include<string.h> # include <conio.h> void main() { char st[20],dt[20]; cout<<“\n enter string : “; gets(st); strcpy(dt,st); cout<<“\n orignal string as: “<<st; cout<<“\n copied string as: “<<dt; getch ( ); } 3-17 ,lVhvkj dSV (strcat) ;g QaD'ku string.h gSMj Qkby esa miyC/k gSA Concatenation dk vFkZ gS tksMuk] strcat eas dsV (cat) 'kCn Concatenation ls fy;k x;k gSA blfy, strcat dk eryc gqvk nks fLVªx a dks tksMu+ k vkSj ,d u;h fLVªx a cukukA ;g QaD'ku igys ls nh gqbZ fLVªx a ds vkxs] ftl Hkh fLVªx a dks tksMu+ k gSA mldks igys okyh fLVªax ds vkxs tksM+ nsrk gSA bldk izk:i bl izdkj gSA strcat (S1, S2); ;gka ij S1 o S2 nks vyx&vyx fLVªx a gS vkSj ifj.kke S1 fLVªx a esa tqM+ tkrk gSA vkSj LVksj gks tkrk gSA #include<iostream.h> #include<ctype.h> #include<stdio.h> #include<string.h> # include <conio.h> void main() { char st[20]=”Rajasthan “; char dt[20]=”Board”; strcat(st,dt); cout<<“\n Orignal string as: “<<st; cout<<“\n Copied string as: “<<dt; getch ( ); } 3-18 ,l Vh vkj ysu (strlen) ;g QaD'ku string.h gSMj Qkby esa miyC/k gSA rFkk bldk dk;Z fdlh nh gqbZ fLVªx a dh yEckbZ ;kfu fLVªx a ds vanj djSDVjksa dh la[;k dh x.kuk djus ds dke vkrh gSA #include<iostream.h> #include<string.h> # include <conio.h> void main() { char s1[20]=”Computer Science”; int n; dEI;wVj foKku /152 n=strlen(s1); cout<<“\n length is:”<<n; getch ( ); } ;g fuEufyf[kr vkmViqV nsxkA length is : 16(including the blank space) 3-19 ,l Vh vkj lh ,e ih (strcmp) a S1 o S2 dh rqyuk ;g QaD'ku Hkh string.h gSMj Qkby esa miyC/k gSA bldk dke nks fLVªx djuk gSA ;fn S1 fLVªx a ] S2 fLVªx a ls NksVh gS rks bldk eku 0 ls de vFkkZr~ _.kkRed eku vk;sxkA vkSj ;fn fLVªax S1 o fLVªx a S2 nksuksa cjkcj gS rks bldk eku 'kwU; vk;sxkA vkSj ;fn fLVªx a S1 fLVªx a S2 ls cM+h gS rks QaD'ku dk eku 'kwU; ls T;knk vFkkZr~ /kukRed vk;sxkA #include<iostream.h> #include<ctype.h> #include<stdio.h> #include<string.h> # include <conio.h> void main() { char s1[20]=”Raja”; char s2[20]=”Raja”; if(strcmp(s1,s2)==0) cout<<“\nThe string are equal”; else cout<<“\n the string are not equal”; getch ( ); } 3-20 ,lVhvkj lh,eihvkbZ (strcmpi) ;g string.h gSMj Qkby dk QaD'ku gSA rFkk ,lVhvkjlh,eih ls feyrk tqyrk gSA ysfdu ;g QaD'ku tc nks fLVªaxksa dh rqyuk djrk gS rks ;g ugha ns[krk gS fd tks djsDVj fy[ks x;s gSA og cM+s v{kjksa esa fy[ks gS] ;k NksVs v{kjksa esa fy[ks gSA mnkgj.k ds fy;s ge nks fLVªx a S1 = "Raja" vkSj nwljh fLVªx a S2 = "raja" ys vkSj fQj ge strcmpi QaD'ku dk iz;ksx djs rks ge ik;saxs fd nksuksa fLVªx a S1 o S2 leku gSA tcfd bUgha nks fLVªx a ksa dks ysdj ge strcmp( ) QaD'ku dk iz;ksx djs rks ge ik;sx a s fd mldk mRrj vk;sxk fd ;s nksuksa fLVªx a S1 o S2 leku ugha gSA ¼D;ksafd mlus cM+s R o NksVs r dks vyx ekuk gS½ 3-21 eSFk gSMj Qkby (math.h header file) 3-21-1 ,Q ,olY;wV fabs( ) ;g QaD'ku fdlh (float) ¶yksV uEcj dk eku fudkyus ds dke vkrk gSA bl QaD'ku dk iz;ksx djrs le; gesa math.h gSMj Qkby dks izksxzke esa tksM+uk gksrk gSA #include <iostream.h> #include <math.h> dEI;wVj foKku /153 # include <conio.h> void main ( ) { float number = -1234.00; cout<<“absolute value: “<<fabs(number); return (0); getch ( ); } 3-21-2 ykWx (log ( )) %& ;g QaD'ku fdlh /kukRed uEcj dk ykWx fudkyus ds dke vkrk gSA ftldk fd vk/kkj e gksA mnkgj.k %& #include<iostream.h> #include<math.h> # include <conio.h> void main() { int x=100,y; y=log(x); cout<<y; getch ( ); } output 2.302585 3-21-3 iko (pow()) %& ;g QaD'ku fdlh uEcj dh ?kkr (Power) fudkyus ds dke vkrk gSA mnkgj.k ds fy, gesa xy dk eku fudkyuk gks rks ge bl QaD'ku dks C++ Hkk"kk esa fy[ksx a s pow (x,y) 3-21-4 LDok;j :V (sqrt ( )) %& ;g QaD'ku fdlh uEcj dk oxZewy fudkyus ds dke vkrk gSA mnkgj.k ds fy, ;fn gesa 16 dk oxZey w fudkyuk gS rks ge C++ Hkk"kk esa bl izdkj fy[ksaxAs x=16, y=sqrt (x); cout <<y; 3-21-5 lkbu (sin( )) %& lkbu QaD'ku fdlh dks.k dk lkbu (sine) eku fudkyus ds dke vkrk gSA ysfdu mlds igys ge fn, gq, dks.k dks jsfM;u esa cnyus ds fy, 3-14 ls xq.kk djds tks Hkh la[;k vk;sxh] mldks 180 ls Hkkx nsaxAs dEI;wVj foKku /154 mnkgj.k %& 90 dks.k ds lkbu dk eku Kkr djksA 0 #include<iostream.h> #include<math.h> # include <conio.h> void main() { float x; x=sin(90*3.14/180); cout<<x; getch ( ); } 3-21-6 dkWl (cos ( )) %& dkWl QaD'ku] lkbu QaD'ku dh rjg gh gSA dsoy varj bruk gh gS fd ;g dks.k dk cosine eku fudkyrk gSA 3-21-7 ,oLY;wV (abs) %& ,oLyw;V QaD'ku fdlh eku dk ifjek.k fudkyus ds fy, iz;ksx fy;k tkrk gSA vkSj fdlh Hkh eku dk ifjek.k ges'kk ,d /kukRed uEcj vk;sxkA x=-3; dk ,oLY;wV eku fudkyus ds fy, fuEu izdkj fy[ksaxaAs Y=abs(x); 3-22 LVsfMfyo gSMj Qkby (stdlib.h) :dbZ ckj izksxkz e ds }kjk ge ,slk uEcj fudkyuk pkgrs gS] tks tc tc Hkh izksxzke dks fu"ikfnr (Execute) djs rks gj ckj vyx&vyx mRrj nsA tks fd lk/kkj.k ykVjh ;k fdlh [ksy ds izkx s kz e esa dke vkrk gSA bl izdkj ds iz;ksx esa ge js.MekbZt (randomize) vkSj js.M (rand) QaD'ku dk iz;ksx djrs gSAa bu QaD'kuksa dk iz;ksx djrs le; ge stdlib.h gSMj Qkby izkxs kz e ds vanj tksMr+ s gSA mnkgj.k %& #include<iostream.h> #include<stdlib.h> # include <conio.h> void main() { int n; randomize(); n=(int)(rand()*10); cout<<n; getch ( ); } mijksDr izksxzke dks tc Hkh ge dEI;wVj ij ju djsaxs rks ges'kk gedks tks Hkh uEcj feysxk] og 0 ls 9 rd gh feysxkA vkSj vxj ge bl izdkj dk izksxkz e cukuk pkgs ftlesa fd og tks uEcj ns og 0 ls 99 ds chp gks rks ge mijksDr izksxkz e esa 10 dh txg 100 fy[k nsaxAs dEI;wVj foKku /155 o [kksyrs le; LVªhe esa fMDys;j djsx a s 3-23 mi;ksdrkZ }kjk ifjHkkf"kr MkVk Vkbi (User Defined Data Types) 3-23-1 VkbiMSQ (Typedef) %& C++ esa ekStnq k MkVk Vkbi ds uke ifjorZu dh lqfo/kk iznku dh xbZ gSA dhoMZ (Keyword) typedef dh enn ls fdlh Vkbi fo'ks"k dks ,d u;k uke ¼ i;kZ;okph ;k miuke½ fn;k tk ldrk gSA ,d typedef LVsVesaV ,d u;k MkVk Vkbi fMQkbu ugha djrk gS] vfirq ;g ekStnq MkVk Vkbi dks ,d i;kZ;okph ;k miuke nsrk gSA flaVsDl fuEu izdkj gS %& typedef type alias; ;gkWa type nh xbZ Vkbi gS rFkk alias mldk u;k uke gSA mnkgj.k %& typedef long integer; typedef double Real; integer K=45; const real PI=3.14159 3-23-2 # fMQkbu MkbjsdfVo (# define directive) %& C++ esa izhizksll s j MkbjsdfVo # define dk mi;ksx dj dksUlVsaV (constant) fMQkbu fd;s tk ldrs gSaA;g MkbjsdfVo ,d VsDlV Qjst (text pharse) rFkk vkbMsafVQk;j (identifier) ds e/; ,d lekurk (equivalence) mRiUu djrk gSA #define PI 3.14159 izksxkz e ds izkjaHk esa mifLFkr ;g LVsbesVa ;g bafxr djrk gS fd iqjs izksxkz e esa tgkWa Hkh vkbMsafVQk;j (identifier) PI mifLFkr gS] mls VsDlV QSjt (text pharse) 3.14159 ls izfrLFkfir fd;k tkuk gSA #define dk mi;ksx dj MkVk Vkbi fMQkbu ugha fd;k tk ldrk gSA 3-24 f}foeh; ,js (Two dimensional array) og ,js ftlesa nks vo;o dke esa fy, tkrs gksa ,d vo;o rks ykbu dks rFkk nwljk vo;o dkWye dks n'kkZrk gSA f}foeh; ,js dk iz;ksx fdlh Vscy dh rjg MkVk dks n'kkZus ;k eSfVªDl lacfa /kr x.kuk ds fy, djrs gaSA mnkgj.k ds fy, ,d dEiuh rhu rjg ds cYc ftuesa 15 okWV] 60 okWV rFkk 100 okWV ds cYc dk fuekZ.k djrh gSA vkSj bu fHkUu fHkUu izdkj ds cYcksa dh ewY; vyx&vyx jkT; esa vyx dEI;wVj foKku /156 vyx gSA bl rjg ds MkVk dks n'kkZus ds fy, f}foeh; ,js dh vko';drk gksxh tks bl rjg n'kkZ;h tkosxhA jktLFkku gfj;k.kk ;w0ih0 15W 60W 100W 12 11 13 15 14 16 17 18 17 3-25 f}foeh; ,js dks fMDys;j djuk (Declaration of two dimension array) f}foeh; ,js dks fMDys;j djus dk lkekU; rjhdk fuEu gSA Data type arrayname[rows] [columns]; Data type - array name - row - Column - ,js ds uke dk MkVk Vkbi dks n'kkZrk gSA tks Hkh ,js dk uke iz;ksxdrkZ nsuk pkgsA ykbuksa dh la[;k dks n'kkZrk gSA dkWye la[;k dks crkrk gSA int price [4] [5]; ;g f}foeh; ,js dks n'kkZ jgk gS tks fd integer Type dk gS rFkk bldk osfj;cy dk uke price gSA rFkk ykbuksa dh la[;k 4 rFkk dkWyeksa dh la[;k 3 gSA mnkgj.k %& ,d izksxzke fy[kks tks rhu rjg ds cYcksa dks pkj jkT;ksa esa vyx&vyx ewY;ksa dks LVksj djrk gksA #include<iostream.h> #include<iomanip.h> /* it is used for setw() */ # include <conio.h> void main() { int price[3][4]; int i,j; for( i =0;i<3;i++) { for(j=0;j<4;j++) { cout<<”\n enter the price of ”<<(i+1)<<”bulbs"<(j+1)<<”states”; cin>>price[i][j]; } } cout <<”\n the price are as \n”; for(i=0;i<3;i++) { for(j=0;j<4;j++) dEI;wVj foKku /157 { cout<<setw(8)<<price[I][j]; } cout<<”\n”; } getch ( ); } 3-26 f}foeh; ,js dk izkjafHkd eku j[kuk (Initialization of two Dimensional array) ,d foeh; ,js dh rjg gh f}foeh; ,js dk izkjafHkd eku j[kk tk;sxkA f}foeh; ,js esa izkjafHkd eku j[krs le; izFke vo;o dks fy[kuk t:jh ugha gSA mls [kkyh NksM+ ldrs gSA ysfdu f}rh; vo;o dks fy[kuk t:jh gSA int price[ ] [3]= {4, 5, 6, 7, 4, 3}; ;g f}foeh; ,js fuEu izdkj eku j[ksxkA price [0] [0]=4 price [0] [1]=5 price [0] [2]=6 price [1] [0]=7 price [1] [1]=4 price [1] [2]=3 3-27 ,js vo;oksa dks buiqV djuk (Inputting array elements) Ex. Write a program of addition of two matrix. #include<iostream.h> #include<iomanip.h> # include <conio.h> void main() { int a[10[10],b[10[10],c[10[10]; int m,n,i,j; cout<<”\n enter the number of rows”; cin>>m; cout<<”\n enter the number of cols”; cin>>n; for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<”\n enter the value of a ”<<(i+1)<<(j+1); cin>>a[i][j]; } dEI;wVj foKku /158 } for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<”\n enter the value of b ”<<(i+1)<<(j+1); cin>>b[i][j]; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { c[i][j]= a[i][j] + b[i][j]; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<setw(8)<<c[i][j]; } cout<<”\n”; } getch ( ); } 3-28 fod.kZ vo;o (Diagonal element) ,d eSfVªDl fn;k gqvk gSA vkSj gesa mlds fod.kksZ ds vo;oksa dk tksM+ fudkyuk gSA rks lcls igys rks ;g rc gh laHko gS tcfd og eSfVªDl oxZ eSfVªDl (Square matrix) gksA vFkkZr~ og eSfVªDl ftlesa ykbuksa vkSj dkWyeksa dh la[;k leku gksA oxZ eSfVªDl nks rjg ds fod.kZ j[krk gSA ,d rks eq[; (Main) fod.kZ rFkk nwljk mi fod.kZ (sub digonal) #include<iostream.h> # include <conio.h> void main() { int a[10[10]; int m,n,i,j,s=0; cout<<”\n enter the number of rows”; cin>>m; cout<<”\n enter the number of cols”; cin>>n; dEI;wVj foKku /159 for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<”\n enter the value of a”<<(i+1)<<(j+1); cin>>a[i][j]; } } for(i=0;i<m;i++) { for(j=0;j<n;j++) { if((i==j) || (i+j==m-1)) s= s+ a[i][j]; } } cout<<”\n sum of diagonal is = “<<s; getch ( ); } 3-29 vf/kdre vkSj U;wure eku fudkyuk (Finding Maximum/Minimum value) mnkgj.k %& fdlh f}foeh; ,js esa ls U;wure vkSj vf/kdre eku fudkyus dk izksxkz e fy[ksaA #include<iostream.h> # include <conio.h> void main() { int a[10[10]; int m,n,i,j,max,min; cout<<”\n enter the number of rows”; cin>>m; cout<<”\n enter the number of cols”; cin>>n; for(i=0;i<m;i++) { for(j=0;j<n;j++) { cout<<”\n enter the value of a ”<<(i+1)<<(j+1); cin>>a[i][j]; } } max=a[0][0]; dEI;wVj foKku /160 min=a[0][0]; for(i=0;i<m;i++) { for(j=0;j<n;j++) { if(a[i][j] > max) max=a[i][j]; if(a[i][j] < min) min=a[i][j]; } } cout<<”\n Maximum value in a matrix is = “<<max; cout<<”\n Minimum value in a matrix is = “<<min; getch ( ); } 3-29 LVªdpj (Structure) LVªdpj (Structure) lkekU; pjksa dk ,d laxzg (Collection) gSA ,d LVªdpj esa fofHkUu izdkj (type) ds pj mifLFkr gks ldrs gSaA ;g fLFkfr ,js ls fHkUu gS D;kasfd ,js leku izdkj ds pjksa dk laxgz (Collection) gSA C Hkk"kk ls vuq#irk j[kus ds fy, C++ Hkk"kk esa struct dhoMZ (keyword) j[kk x;k gSA tks C++ esa LVªdpj (Structure) fMQkbu djus dh lqfo/kk iznku djrk gSArFkkfi C++ esa LVªdpj (Structure), C++ dh Dykl (Class) ds leku gSAC++ esa LVªdpj (Structure) ,oe~ C++ dh Dykl (Class) esa eq[; varj ;g gS fd C++ LVªdpj (Structure), C++ dh ,slh Dykl (Class) gS ftlds lHkh lnL; ifCyd (Public) gS rFkk QaD'ku (Function) ftlds lnL; ugha gks ldrs gSA 3-29.11 LVªdpj fMQkbu o fMdys;j djuk (Defining and Declaring Structure) 3-29 flaVsDl (Syntax) :LVªdpj fMQkbu djus ds fy, struct structrue_name { data type variable1; data type variable2; . . data type variablen; }; LVªdpj fMdys;j djus ds fy, structure_name structure_variable1,structure_variable1; dEI;wVj foKku /161 mnkgj.k (Example) :struct Employee { char name[20]; int age; float salary; }; Employee e1; mijksDr mnkgj.k esa geus Employee uke dk ,d LVªdpj cuk;k gSA name[20] ,d char Vkbi dk pj gS] age int Vkbi dk pj gS rFkk salary float Vkbi dk pj gSA tks LVªdpj employee ds lnL; (member) gSA Employee e1; mijksDr LVsVEsaV esa geus LVªdpj Vkbi dk ,d pj e1 fMQkbu fd;k gSA e1 pj dh ;g ifjHkk"kk eSeksjh esa 28 ckbV LFkku lajf{kr djrk gSA ,d char Vkbi dk pj dks eSeksjh esa lajf{kr djus ds fy, ,d ckbV eSeksjh Lisl (Memory Space) dh vko';drk gksrh gSA pwafd pj name ,d char Vkbi dk ,slk ,js gS ftldh foek (dimension) 20 gSAvr% name pj ds fy, eSeksjh esa 1 ckbV X 20 = 28 ckbV LFkku lajf{kr gksxkA age int Vkbi dk pj gS ftls eSeksjh esa lajf{kr djus ds fy, pkj ckbV eSeksjh Lisl dh vko';drk gksrh gS rFkk salary float Vkbi dk pj gS]bls Hkh eSeksjh esa lajf{kr djus ds fy, pkj ckbV eSeksjh Lisl dh vko';drk gksrh gSA pj e1 Employee Vkbi dk LVªdpj gS vr% fMdysj's ku (Employee e1) ds }kjk eSeksjh esa dqy 20+4+4=28+ ckbV LFkku lajf{kr gksxkA ;g x.kuk ;g eku dj dh xbZ gS fd dEI;wVj ,d 32 fcV e'khu gSA 3-29.22 LVªdpj ds lnL;ksa dks ,Dlsl djuk (Accesing Structure Members) 3-29 ,dckj LVªdpj pj fMQkbu djus ds i'pkr MksV vkWijsVj (Dot Operator) dk mi;ksx dj ml LVªdpj ds lnL;ksa dks ,Dlsl (access) fd;k tk ldrk gS tSls & e1.name= "SHAILENDRA"; e1.Age=42; e1.salary=40000.00; MksV vkijsVj (Dot Operator) dk okLrfod uke esEcj ,Dlsl vkWijsVj (Member Access Operator) gSA mnkgj.k (Example) :cout << "\n Name" << e1.Name; mijksDr LVsVesaV employee LVªdpj ds lnL; Name dk eku vkmViqV ds #i esa iznku djsxkA dEI;wVj foKku /162 3-29 3-29.33 LVªdpj dh MsfQus'ku o fMdys;js'ku dks feykuk (Combining Definition and Declaration of Structure) flaVsDl (Syntax) :struct { data type variable1; data type variable2; . . data type variablen; }structure_variable1; mnkgj.k (Example) :struct { char name[20]; int age; float salary; }e1,e2; mijksDr mnkgj.k esa LVªdpj dh ifjHkk"kk (definition) ds fy, vyx ls LVsVesaV ugha fn;k x;k gSA 3-29 3-29.44 LVªdpj ds lnL;ksa dks buh'kh;ykbt djuk (Initializing Structure Members) flaVsDl (Syntax) :struct structrue_name { data type variable1; data type variable2; dEI;wVj foKku /163 . . data type variablen; }; structure_name structure_variable_name={value1,value2...valuen}; mnkgj.k (Example) :struct Employee { char name[20]; int age; float salary; }; Employee e1={"SHAILENDRA",42,40000.00}; Employee e2={"VINEET",41,80000.00}; 3-29.55 usLVsM LVªdpj (Nested Structure) 3-29 flaVsDl (Syntax) :struct structrue_name1 { data type variable1; data type variable2; . . data type variablen; }; struct structrue_name2 { data type variable1; data type variable2; structure_Name1 Structure_variable1; }; dEI;wVj foKku /164 mnkgj.k (Example) :struct Employee { char name[20]; int age; float salary; }; struct Company { char Company_Name[20]; Employee e1,e2; }; 3-29.66 LVªdpjks dk ,js (Array of Structure) 3-29 flaVsDl (Syntax) :struct structrue_name { data type variable1; data type variable2; . . data type variablen; }; structure_name structure_variable_name[dimension]; mnkgj.k (Example) :struct Employee { char name[20]; int age; float salary; }; dEI;wVj foKku /165 Employee e[100]; mijksDr mnkgj.k ds LVsVEsaV & Employee e[100]; esa geus Employee LVªdpj Vkbi dk pj fMdys;j fd;k gS] ftldh foek 100 gSA 3-29 3-29.77 LVªdpj dsk osY;q@vkjX;qesaV ds #i esa ,d QaD'ku dsk Hkstuk (Passing Structure to Function as Value/argument) ,d iwjk LVªdpj (Structure) vkjX;qesaV (argument) ds #i esa ,d QaD'ku dks Hkstk tk ldrk gSA mnkgj.k (Example) :#include <iostream> # include <conio.h> # include <stdio.h> using namespace std; struct distance { int meter; float cm; }; void display( distance d ) ; void main( ) { distance d1,d2; cout << "Enter meter:"; cin >> d1.meter; cout << "Enter cm:"; cin >> d1.cm; cout << "\n Enter meter:"; cin >> d2.meter; cout << "Enter cm:"; cin >> d2.cm; cout << "\n d1="; display(d1); cout << "\n d2="; dEI;wVj foKku /166 display(d2); cout << endl; return 0; getch ( ); } void display( distance dd) { cout << dd.meter << " m " << dd.cm << " cm"; } mijksDr izkx s zke esa main( ) ikVZ nks nwfj;ksa meter rFkk cm QkSZesV usa mi;ksxdrkZ ls izkIr djrk gS vkSj mUgsa nks LVªdpj d1 rFkk d2 esa j[krk gSA fQj ;g QaD'ku display( ) dks dkWay djrk gS tks LVªdpj distance dks LVªdpj ds #i esa Lohdkj djrk gSA ;g QaD'ku nwfj;ksa dks lkekU; QkSZeVs esa fMLIys djrk gSA Output :Enter meter:8 enter cm:2.5 Enter meter:9 Enter cm:4.5 d1=8 m 2.5 cm d2=9 m 4.5 cm 3-29.88 QaD'ku fjVZfuax LVªdpj (Function returning Structure) 3-29 fiNys [k.M esa ge i<+ pqds gS fd dSls ,d iwjk LVªdpj (Structure) QaD'ku ds vkjX;qesaV (argument) ds #i esa Hkstk tk ldrk gSA blh izdkj LVªdpj dks QaD'ku dh fjVZu osY;q ds #i esa Hkh pqu ldrs gSA mnkgj.k (Example) :#include <iostream> # include <conio.h> # include <stdio.h> using namespace std; struct distance dEI;wVj foKku /167 { int meter; float cm; }; distance add_distance( distance& d1 , distance& d2 ); void display( distance d); int main( ) { distance d1,d2,d3; cout << "Enter meter:"; cin >> d1.meter; cout << "Enter cm:"; cin >> d1.cm; cout << "\n Enter meter:"; cin >> d2.meter; cout << "Enter cm:"; cin >> d2.cm; d3 = add_distance(d1, d2); cout << endl; display(d1); cout << " + "; display(d2); cout << " = "; display(d3); cout << endl; return 0; } void display( distance dd) { cout << dd.meter << " m " << dd.cm << " cm"; } void add_distance( distance dd1 , distance dd2) dEI;wVj foKku /168 { dd3.cm = dd1.cm + dd2.cm; dd3.meter=0; if ( dd3.cm >= 10.0) { dd3.cm -= 10.0 ; dd3.meter ++ ; } dd3.meter += dd1.meter + d d2.meter return dd3; getch ( ); } Output :Enter meter:8 enter cm:2.5 Enter meter:9 Enter cm:4.5 8 m 2.5 cm + 9 m 4.5 cm = 17 m 7 cm mijksDr izksxzke esa main( ) ikVZ nks nwfj;ksa meter rFkk cm QkjesV usa mi;ksxdrkZ ls izkIr djrk gS vkSj mUgsa nks LVªdpj d1 rFkk d2 esa j[krk gSA fQj ;g QaD'ku add_distance( ) dks dkWay djrk gS tks d1 rFkk d2 dks LVªdpj ds #i esa Lohdkj djrk gS rFkk mUgsa tksM+ dj rhljs LVªdpj d3 ds #i esa main QaD'ku dks ykSVk nsrk gSA 3-29.9 LVªdpj dsk jsQjsal ds #i esa ,d QaD'ku dsk Hkstuk (Passing Structure to Function as reference) ftl izdkj lkekU; MkVk Vkbi dks ,d QaD'ku dks jsQjsal }kjk Hkstk tk ldrk gSA mlh izdkj ,d LVªdpj ,d QaD'ku dks jsQjsal }kjk Hkstk tk ldrk gSA finys [k.M esa fn;s x, izkx s zke esa geus QaD'ku add_distance dks LVªdpj d1 rFkk d2 osY;q @vkjX;qesaV ds #i esa Hkstk FkkA bl [k.M esa] LVªdpj d1 rFkk d2 dks QaD'ku add_distance dks jsQjsal ds #i esa Hkstasxs A dEI;wVj foKku /169 mnkgj.k (Example) :#include <iostream> # include <conio.h> # include <stdio.h> using namespace std; structure distance { int meter; float cm; }; distance add_distance( distance& d1, distance& d2 ); void display( distance d ) void main( ) { distance d1,d2,d3; cout << "Enter meter:"; cin >> d1.meter; cout << "Enter cm:"; cin >> d1.cm; cout << "\n Enter meter:"; cin >> d2.meter; cout << "Enter cm:"; cin >> d2.cm; d3 = add_distance(d1, d2); cout << endl; display(d1); cout << " + "; display(d2); cout << " = "; display(d3); cout << endl; return 0; getch ( ); } void display( distance dd) dEI;wVj foKku /170 { cout << dd.meter << " m " << dd.cm << " cm"; } void add_distance( distance& dd1 , distance& dd2) { dd3.cm = dd1.cm + dd2.cm; dd3.meter=0; if ( dd3.cm >= 10.0) { dd3.cm -= 10.0 ; dd3.meter ++ ; } dd3.meter += dd1.meter + d d2.meter } Output :Enter meter:8 enter cm:2.5 Enter meter:9 Enter cm:4.5 8 m 2.5 cm + 9 m 4.5 cm = 17 m 7 cm vH;kl iz’u oLrqf u"B iz’ u fuEufyf[kr iz’uks esa lgh fodYi dk pquko dhft, 1- js.Me QaD’ku dk iz;ksx djrs le; fuEu gSMj Qkby dks izksxkz e esa tksM+sxaAs ¼v½ fLVªax MkV ,p ¼c½ ,l Vh Mhfyo MkV ,p ¼l½ lh Vkbi MkV ,p ¼n½ mijksä esa ls dksbZ ugha dEI;wVj foKku /171 2- 3- 4- 5- 6- 7- fuEu esa ls esFk MkV ,p gSMj Qkby dk QaD’ku gSA ¼v½ bt yksoj ¼c½ ykx ¼l½ js.Mekbt ¼n½ ,fXtV ,js ds vUnj lkjs vo;o gksrs gSaA ¼v½ ,d gh rjg ds ¼c½ vyx&vyx rjg ds ¼l½ feDl rjg ds ¼n½ dksbZ Hkh ugha 20 fo|kfFkZ;ksa dh vk;q dks ,d foeh; ,js esa LVksj djus ij mlds ,js ds vo;o ds uEcj gksaxAs ¼v½ 0 ls 19 ¼c½ 0 ls 20 ¼l½ 1 ls 21 ¼n½ dksbZ Hkh ugha ,d fLVªx a osfj;scy char name [20]; esa osfj;scy ds vanj v{kj vk ldrs gSA ¼v½ 20 ¼c½ 19 ¼l½ 21 ¼n½ 22 ,l Vh vkj lh ih okbZ (strcpy) QaD’ku dks iz;ksx djrs le; izksxzke ds vanj gSMj Qkby tksMsx + saA ¼v½ eSFk MkV ,p (math.h) ¼c½ fLVªx a MkV ,p (string.h) ¼l½ lh Vkbi MkV ,p (ctype.h) ¼n½ mijksä esa ls dksbZ ugha fdlh Hkh v{kj dks cMs v{kjksa esa ifjofrZr djus dk QaD’ku gSA ¼v½ Vw yksoj (tolower) ¼c½ Vw vij (toupper) ¼l½ bt yksoj (islower) ¼n½ bt vij (isupper) y?kqÙkjkRed iz'u (Short Answer Type Questions) 1- fdlh Hkh fLVªax dks ,js esa LVksj djus ij mldk vafre djSDVj D;k vkrk gS\ 2- ,js fdrus izdkj ds gksrs gSa \ 3- nks fLVªax dh rqyuk djus okys QaD’ku dk uke crkb;s \ 4- fdl izdkj ds ,js esa ykbu o dkWye dk iz;ksx gksrk gaS \ 5- VkbiMSQ (Typedef) D;k djrk gS \ 6- LVªdpj dks fMQkbu o fMdys;j djus ds fy, flaVsDl (Syntax) fyf[k,A 7- LVªdpj dks buh'kh;ykbt djus ds fy, flaVsDl (Syntax) fyf[k,A fucU/kkRed (Essay Type Questions) 1- C++ Hkk"kk esa ,d izksxkz e fyf[k;s tks ;wtj }kjk fn;s x;s la[;kvksa dk vkSlr eku fudkysA dEI;wVj foKku /172 2- ,d foeh; ,js vkSj f}foeh; ,js esa vUrj fyf[k;s \ 3- ,d izksxkz e fyf[k;s tks nks eSfVªDl dk tksM+ fudkysA 4- C++ Hkk"kk esa ,d izksxkz e fyf[k;s tks ,d fLVªx a dks i<+s o fLVªx a ds vUnj ftrus Hkh Loj vkSj O;atu gSA mudh x.kuk crk;sA 5- C++ Hkk"kk esa ,d izksxzke fyf[k;s tks fd ,d eSfVªDl ds vanj eq[; ,oa mi fod.kkZsa ds vo;o dk tksM+ fudkysA 6- C++ Hkk"kk esa LVªdpj D;k gksrs gSA LVªdpj dks fdl izdkj ,d QaD'ku dks Hkstk tk ldrk gS\ izR;sd dk ,d mnkgj.k nsdj lEk>kb,A 7- C++ Hkk"kk esa ,d QaD'ku dks fdl izdkj fjVZu djrk gS \,d mnkgj.k nsdj lEk>kb,A mÙkjekyk 1- ¼v½ 6- ¼c½] 2- ¼v½ 7- ¼c½ 3- ¼v½ 4- ¼v½] 5- ¼c½