You are on page 1of 20
, yf Patt Marke 72 ‘ NG Answer yy qc ain 4 (8) User ances x (ingests mage te 21 0) Brow the Hack dagrm ofssumpuc, SPCMONA I A ats ovag to emp Dat teen Sis ian ant onan maior 8 | (©) Write down he {hat arise by 7, Als draw th cosptng fon aes ) The owing isa scpnent os programs yl vor i. mend I yoy h print ba" 9: ‘What willbe vals of any fn asses vale oF andi) 0? (9) te what way can the : operator be wed in plac fan ele sont? ‘18 ofthe flowing messages depering onthe vl ensign eH (MOT hag haea vane ot vee fee LUKE Wal ita hae ue of {G)_ COLD. ir ag hav asa of 30 {6 OUT OF RANGE ig hoy her vali Zr) Wetea€ pn sows hms Go snarl ut oe on on = se | un i a [3]f 5,113, 2025 tin Satis sat erin al hd alam (2) What ae the dittrenses betwen ie and switch statement? (©) Write the ouput for the Foon eo main) fon i. fort O: 85: 4 Sor Get jei. jo) frox sap) phil ss (1) includes std. > in funtion i) (return (1): ‘main ) {nt § fic, rif ali return @ © Cans twetion be cal fn in now han one place within a prograr? FTA inh sn of lingers read a ex 200 9 (©) Wt sich tatement hat wil examin the valu ofa leper vale called Ng and ent 03 iad © vaaiewecitree so sine an in? rc sna nn iph me | bed: q jae ! poh; wf enne ’ pognpaepl pring a ye Spoon tip. Perter rinft ab Na f f (2) What isthe prose of kyon oid? Whi this heya 0 (@)_WeienC pga elt tro name wing sho o os (9) isinguish soso he flowing os (ena nt, i) etc ana pa) i)_ Act argunea nd oma rg ‘em whe he ber of ac agents is fst han che number of Formal 03 arguments na function, (©) A le named DATA consi a sctios of inger numbers. Cole a propram 10 read hese 0S ‘amber and then ws all ol nies Go i ob ead OD and al eve ner 6 8 Risto be cated VIN (© What the purpose of using mul chartering? { (OJ Gt shat way doesn aay dtr fram an oninay vibe? Law are wtiimersional aay 08 detne? Compare wi ne dimension ay EAD) Wii 4.€ progean that wil ake ral number an es a an ot me Ht eas according tthe cap in decenng ae (©) Tow i printer variable declared 2 + GAY eo. wee don pas of losing “4 seep i gy ist) str itay inch an iat see o into [40.00.00 Mot tn SIAL 181. 38 8 J Ci) chaewond | oR MY Gi) imide} 40.0.0. Le ) (0). Toatroh {10} 6 (©) Wilt program to th loi we Toe Tocupu th weston abo ihsivense of CP {iy Tosceept an ansver il) To prin ur “Gorn then stop i the anwar i oes Ga Tobnput the menage iy agai he anwer fH, | j Page Dol? Thin ne ieeeg Sonera “i Coat sing! | =a i Aeon SX ul hig Tt owe “ , iy ice er pt ech ra f ! : SUCTION A. feast ‘Me | Draw the block diagram ofa digital compu i Funetion x {+49 tes in alone ei tn feta |“ C CON" Cy ty a Ghenrme a {© Who Sie Whe re he eee was ston oie ‘ktion aye ame : a: 2) Whats operating Wie dawn panos spetingsptn | (8 edn the ul flan oe ‘ ‘maid (| Tov, To Len 9 rinugenntad ood iets ) (6) Datet he ero) forte flloeng program cade. Aer eotcetion wha wil the value ots? Hincludecattioi> fein 52; rain) ina, 0) Explain brief oprtor residence and asoiaviy with example Or) een aes ite pine wine on oer ‘on foaniaet) fanbeigbern be) igh print Bangladesh F } ) {€) What wil be the output Forth following program code? fincludecsdio b> ‘main() i ( “f int x3; seeBH2 aH {| mi \ Itselse statement, Which is more convenient? (0) What does a break statement do? Which contol structures use it? n a lop, what i the diference 3 (6) Write &C program to solve the following linear equations withthe two unknowns x andj: between a break and continue statement? axthv=m and ertdben SECTION ‘©-5@) "What are the funeton prototypes? State thee advantages to the we of functions. (© Mains userefined function How dost ifr fom othr wserdetne functions? Explain Sypcasing with empl (© What sreerion? Wea progam to find he fctrlmunkerstichempaysrecusion Qa) Explain the need for array variables, Predict the output of the following program: 5 #include oe y tnemaing t Prin vale of x= land valu ofy stam; .~ : - © What re the seasons for using pointers? Practically speaking, what isthe difference between 2p rays and pointers? (© Willan efficient code for extracting unique elements froma sated list of ray. e (eddy & 5,5,5,9,9,9,9)=>(1,3, 5,9) Q7(@) What isa stucture? Define a structure called cricket that il describe te flowing informaiton: 4 player name ‘eam name total match batting average Declare an array player with’10 clements and write program tread the information about all Players and print name ofthe players with the batting average. (©) Wiit is a union? How does a union dite from a structure? For what kind of appiications are 3 unions useful? (©) Whats flowehart? Draw a flowehart that ean find muaxinun nber liom a set of numbers ¥) Q.8(a) Define file. Write down the general format of declaring aed opening a file, Write down the 4 ‘operation of getsQ and puts) fanetion with example : (b) What will be the output ofthe following cade and why? ¥ include int main G int x= 40; { int x= 20; printh("%d " s); } printf ("min%d".x); return 0; } (©) What is dynamic memory allocation? What isthe diflerence between malloc() and calloc()? ol BASS 591 Coq Dep tse gh or ike nak ey oy MT ae om 0) What ane puto ae oe agra met of Hetil aa ena icing Yer ncn aking thee fran ach ston and cache memory, What ae the van iin br he operating princi of OC.” keywords. and Kener. What estetins apy to wse then? incudecsia.> maint in aot iiss ay ‘ey pra te (2) Bete amd come errs, any in she ling sates, fi) sci ed ua. 09) rant na a Gin Seanted ewe)! G9) Seantewea b aa (0) What isthe 0 and Tes than 200 that are Draw the flow char fr th Fr the flowing pe semen cons ho rf hs feos (i dawhie nd while {Beco bad eomtnve pt forthe flleng program cod? ‘oid maing int, 960 for (onts ices es) ( Tor (b=U; ews; be+) | sath, Prin (46a, 3, bak 1 1 prt a, 8 ’ Write a program to find the number of and sum of all integers divisible by 7. he following ouput of a program, 1 23 456 78910 gal computer plan the tmsana ah he a scvived by the Loud, if {ind out maximum power te vente a€ program 0 Snvied from 18 10 600. =300, R:#200, H=50V SECTOIN-2 ‘ oa 5. (@) Distinguish bewween the folowing: Ch) Actual and formel arguments) Library — Od function and user detined fnetion (©) Detine funtion, What the advantages of vn fntion? ra (©) _Detine recursion, Write a program to find the factorial ol n by using recursion, 805 isa positive iteye. (QS. (3) Deine file. write down the general format of decarng andl opening file. Write 689 own the operation af get pute) function. (©) What is “bit fel"? How sa pointes inlined? Hxplun te dttesenees heweoen 05, “eal by reference’ a call by value 97. (a) Define stcture and non, What flere hoes 8 (©) Detect tne errs) tye the Following program, Aber cawrecion, Hid out the 7 ‘utp ane Byte requiea by sucane atte ect Ainclude fineludeceonin > stroct record char name 10} ‘duble weight Moat weight ' \ void maing { cise) struct record student 5 96 4d student nam “bakoo", 50.5.7) stuns. weight, stent eight hg; print ' 2) What is software? Wh application saftware? '5 the lfferuee beorven system soltware and 02 QF (@) Cana feria be cited fom wore than one place within a progam? Wh isthe ba Purpose ofthe keyword voi’? What are te usfutiss a mul setemea (6) ‘What is meant by dynamic memory allocation? What isthe pixpose ol mallocand 2°! «alloc? (©) Write aC program to find out average class test marks of ten stunts ns a wi a Mac Course Now HEEISL i ss All questions are oF equal value Use separate answer script fur eavh sexton SECTION A, oF” sre dow he ty aes 9 gran ane he meres FE 4 ee age SS ont ye AG, Berens wenery. What ethene bsween KAM anLtOMt SE 3 (SS Whats meaurby at operating ses Egy te Taetons ofan oping 20) Describe the four basic datatypes, How could we extend the range uf values they 4 present nam (WHEE ore wae diTrences batwean KEW Tad’ Usiifers? Vetine operator 3% 0.80) What are maT SPB? How waHy 9p ji pra? What isthe erence tetwcen 4 an i, wht is avaible? 3 KI} Writes progr to converts dain number ts binary eauval 5 & Qa) “Dei te and chasify C spoitank, Wat are the advantages of (sing “short handy nds re associated with # wary 3h assignnent operators"? 22497 In what vay da etch salient ir fram an ifsatenene? 2 =a” Wri ema ee a in sme ie se sow 3 THB BIDE ssnsesnoun > al. peo re Wer Tey why { 'eroay, pines er, Oo bes pet ga) Ys erm, ey Ee Wat rh inayat of wing dt fe Wi te paper st) 4 os sod (= progcam in, C which will veal two integer numsers from a fle named 4%, Sei fuk te vege of then mul send the rests 9 an output file named real dutput ot Hlowing prope, . a 2 Serio mh sei ‘Sine Bales 5. i primera; o*< Q.GBF Explain the ncest fur array variables. } Bs N ; ies prora to pin the owing up sing or os 5 ce 33 ‘ aaa 59558 fd seve. i ay, in uch of te Following looping saints. Assune dat all the 4 Variables have been delat sid assign values este Pvinte“book™)) hile(aame= 1) = 270), What 2h ite 5 NTU © 4 APE Taite 0 program in C ho tind the prc oftive mattces and 1, Given that Ais 5 A x tears aut Bis Cx Mi ‘Write progrnin to sorta aay of tepes i deeending ot. 4 (6) Find the outpat ofthe followin #, ino wile (itsaag | 4 oa (sa sor fourth i180) wd pint Hee MAL vy uiwer sg be Wet oulyok ater i ee ete apenas Peat ee nano is ‘ li | a R67 No te cons Ice Lys ad \ 5 BAY ge) Gen te nr veneer : |) Aves Sei tars i z | wha ‘Ee ccmpec 3 | CER msm a he flv nmin tnn 4 Lf Bip teen somata ides ~ i rie et ale oe wane (2) Ina wags try ote fm a1 ene ™ : Sev she th it in soe Rh dd mind @ (Poems ao Fsteuy | BN ie soe s atc wg itn whi a far + of? nace | 1 sin se sige @ ty pose i i ot y “ey : MoS 67 Fhe 3 = oe vac) ede aes Taco ene: : TH yea: sang ) he ba free! Gut 5 Qt" i \ \ ' DAP | From Tarp ston? Define ssuinsion, wea tinct be eal TREN C1 Yocaent he Hci ay "etl openings, Wie he apeation a [ w Ys ng ing First year Second Semester Fxaninatie, 2007 Cnre No. HLIEESL Conn ale donee Copan uaa 70 Thc: 3 ur 101 ewe Sqn in oy oh dt len ciao a (Ai eae an re nbn in ohne er RA a ML i 106 es lomesiy a cpa ei ef ecrnic snl dj 4299 Whe down de bal sure of © poston ” wena et ; F ons a vata ane wy? 2G Niel iste tenes bancon tian wise misaviisier 59 Q fd) “Corectthe flowing cove segue me i Foe : ‘li mai i nine ) Find dhe outa the fotlwing code fort se delved fancios? Integer lita shows whet pring nub oF vot 40. Watiadvaape we ie at ta t Eeina the output of de flowing code segant sl inti = for G2usicnavny for Gs jij) itu one Hen: Fu hai latent wh ie co SECTION B 5), Whatisthe diffrence ixtveen sista wisi? 301 441) © Whacisvienaun 3+ ; vier Uo) «What isthe advantage of using vaiabless} for eacuation, a q y 5 ea i ingen eons | 8) Sree ingen gt i evar iP abaaarypa cae 3 i lca) yeaa wih song: wer nl hs mes) ol gl » i) rea anal comin: suena 5 7 ” rt sh Wit a prope ns yer heck wht tig ep ye Wats paso aac Re q Coe FOE ans econ en, Nowena 3 bi ) Whats meant by futon ei? Fm wat pan L Funai be ellel? Psy ropa sma sees ; site (were 0 * q [. for Geaijeis jue) Ls eeret ob i det ioe W i a | 4 | oe t Sima an igh toast ttn Po a her it ot” eerie ote fling eis, i We Dow Ue ela Fa rss shih ln ta sums x0 WIS spout vn 9 OE Qe) WintsreTeTatonaphanstiagSATT Wis stheconat] oT 3 j ‘funtion that wit elelte We eto B= ve ftv, Wo Gee acs yamepupan caer SEO) , Distinguish su an Ty - My yo hay eye eo & fo Dette a sete tt ean ace he mene elements 7 vi such ase grade aver ur cage an amber of moms. Wi © pot peo iat Tete ndesT efor nos af oerge roi charge, (oiowing operation) ip (©) Witeasttenent idee ti J Q8te) Write down tical of we dfs on, As 21Q. Ween C pogsem ty sot sno dss in descigoec sng a we defied fnton i y A progr as been copia al kel ely, Whev yon ane ROGI, FO sone ot Tks) Param is exe Wt anu) Wes coe more of the fll answer. ii) docs aa sep uns, Wa at te posible etses it sac ee wha seps would =| hu lel with average roo: cages less hana given value bso il is wiles wade addnss of he youltake io eonse en, ' { Axos pK At l=elB Bt a=) D+ |G ae KB mst or ; 4 Bectonig E222" Ye \ 4 2 meena hm Wisin ty eect teN Se Ab) When oe computer? Deseri Iv tout inary 22/0 i rent by branching vg, en opamin eke tt ret of sh amen? | i i ; Rp ng "fr lp pe | 2s mates ¢ ie yy en? aes Oo ER or | cua ad 1 © hn wager nswitchstaeeats fo an if statement 6 \ | Mm sige stewie What inthe relationship between a0 Ssignent sintemeit $7) nee ma staeneni? + : 7 a y ren, ete ys to liz the incmen an eteetoperder haw da the ew se nie wa ‘ deci! pedo ow Jo the wo What ete w ei ra witha nc pm ? Con ‘wien an enktie (CO) emounted we 4 9 Whaat is micay? tiv chat ways doe a ini Varin dite finn Y le? ve © a ‘ SLOMON= 8 oF 3 gam em ett ge ut in sein) % ‘240} What een by sage clas of sible? Nae te sage clan psionic in ® Wives jrowam nerets (1 What ie poiner? igen fn vain veoh ation y~rea¥) einen st pedo wth a Ho} How cam shctuie vanes dete? sles the ete vale deena ates i tin cline type declttin® ¢ 1 19 Compare * uno setae yo Hinds af picts ve von sei? uw 46) Write» progam iu tn pint 20 ous fe act nit n0 4 fa, ie ea a os pm % (BS Witenes Cena ire ing es Cade aga wend hese aires anid waste ali she prone wives ina dle named PRINE.FEL, all the ould wane in. x file wind OD LF pul all abe ese sales ina file ined VERE Sol "oe ii ~O570 Fe cunenn 1." Ant quo, aig hee ern ech Scion, 2 Haran fu rh Sepa ip freee, stirs ot ie miel 9 genine) 78, ga sei ie Wit FOYE orn he go eee heme Ti ee morn echina ro soci hig Coe tite Pas Pha ete nl wis a pt emmuter Show tg necondib it! ! we Liaeaty i ‘ ‘ ¥ woateney hs d { ort pet v : waite Mites L j ar) fisCtnecsy rm one 30 a ji} et a We 7 pica le meet ond’) sf sn want mp ef aennnal vy re Wha the one, ee ats “in ey oa sane hat eB ale ae al eda aed AMEE os ate py tha ol ail a eer mr w nd eae Wt “4 4 A | ie ib ae asm Sousse THe: Compater Programming & Fund ‘undamentals yo" y a aanune ary x 400 taking tre fhm each sek, hes Cites ' sEcrio: ©.) Dest da ype a aguge & Witisne dione twee epee sa ute I «s (©) What is escape sequence? aay » ) Deine agri & toc PO io H (©) Wits down he slr o' x Stow econ nding the verge of tes 3 chs ot marks among rote suige ie 4) Watce Cpe Howat Cp hb en sce otan ag tem 3G) waetCmenmesio setinagoupae) 12330 Nereis ] © Meera lel Atngmtr rs legs ee A J Out: 15337037407 mai (xe _ forms sep “ TstnGjaiy ren : ma 7 print a =H6 4, x)) main () ( = while (209 1 prin 40 03) (©) What we tn prpes fhe lions ans () om) Ge sre (en) 03 SECTION 15 5. (a) Wenge snr th lawn alin toe “ i voi une (intB ih Shar word {= CAS RR AY iit, int values (3] [4] = (1, 2,3) (4,5, 6) (7,8, 915 iv. float res [10] “0; ' (0) When passing an ara toa anti as argent how the inion prope an anton call 08 shoul be delat? Show with an examps ha (6) Write aC program o obs olin pa 2 , i cot bbw poet PE EEF pris a perfect mumbae pe, svhether a given input nom ‘nay with an exa 3) Write aC program find vt 0 ng been i Oe at long oR =m multidimensional int e{10}= (1,23, 4.5.6 for (a= 05 a 10; 448) irqewr2)==0) be= lah 8,9, 0} 1") (9A (a) What do you ean by focal variable i) ? How recursion is differ from an ordinary Function. Exp! ct? Explain the steps of execution, global variable in with proper exampl (0) Whats ocursion () What isthe ouipt of he following program sey main () (intial 10}=C 1. 5,-9)5 6% 0 fow( = 0: is HH) (print Hd", a5) eth} prints 9", 25} 128° (4) Write © program to take int ina ary ad aplay the even srs Tn @ new ama ell LEVEN ain odd numbers in other aray ODD. allowing funetion prototypes: () What sla you mean by i mF Cinta fi, char F(void)s ji, double F( double a int b); iv, float a (char aa, float bb, int ce}; (©) Find output of the following program segment: main (){ int char e[ = “progsamiing ith"; for (a =0; efa}!="\n0"s +a) it((a%2)== 0) print(a%e", ela) )

You might also like