0% found this document useful (0 votes)
61 views5 pages

JAC Class 12 2014 Computer Science

wtf

Uploaded by

mvprishabh123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
61 views5 pages

JAC Class 12 2014 Computer Science

wtf

Uploaded by

mvprishabh123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
°Computer Science - 2014 Group-A . (Multiple Choice Type Questions) ‘Name the header file to which the following belong: () Moor ()—(il)setw () Ans. ()) malhh (i isomanip.h (©) How does ‘encapsi Ans, A classbind together data and its associated functions under ‘one unt thereby enforcing encapsulation as encapsulation ‘means ‘repping up data and associated function together into a single unit. A class groups its members into tree section private, public and protected. The private and protected members remain hidden from outside word. Thus through private and protected members, a class enforces datachiding The outside world is given only essential and necessary information through publi members, rest of the things remain hidden, where is nothing but abstraction. An abstraction means representation of essential features without including one background details or explanation Rewrite the following program after removing the syntactical error(s) is any. Underline each correction. struct emp; i © int id; char name [20]; private : getemp (void) showemp (void) ) main( ) do count< Hinelude Hinclude void funnystr (char * , int n=2) @ white steen 9) while (sf $= "0 ite Wa ass iP) =2., (te: well SS i= tolower (s [D5 ints } 7 void main ( ) char str | |= "MiCroSoFT" funnyste (str 3) 3 count < it updatel (int b3) “( int temp: temp’= 3 = (43%10%2); return temp; &32, int 33 = 40) ) Void update? (int sl, it st > 32) st = alse sl=stesty it else s2= 92-33; #3 =updatel (63) 3 count << sl <<" }"1000 for Savings account and >-3000 for Current recount ‘Nnction Display () which dnplay the ontents of fi the dat members for an acount fm ds private: charname (10); Tongintaccount no; chiar iypectic Moat balance; tr = HOoet s typeoface ='S' ; Ea, void new_account () count <<"Enter your nam cin>> names ount <"Enier your Account No; tin>> account_A0; extn Ee? yor Acout Type" * fce= getchar(); Perret your Ui, Balance Re 1000/- for Savingand™ count <"Rs, 3000/- for Curent cin>> balance; oe deposit () float amount ; Jong int account_no cout <<"Enter Deposit Amour cin >> amount ; ‘cout <<"Enter your Account No: cin>> account_nol ; if(aceount_no=account_nol) bbalance=balancetamount; withdrawal () oat w_amount; long infaccount’ nol; ‘cout <<"Enter Withdrawal Amount cin>w_amount; cout <<"Enter your Account No:"; cin>>account_nol; if(account_nd—account_nol && typeoface~'s'&& balance>1000) Dalance=talance-w_amount; i(account_no=account nol&& typeoface~s' && balance>~3000) ‘alance=balance-w amount, de ‘void display () ‘count <<"Name:"; @ Ans. FVtiy indo tle iehneiatin peonind “Account NO inna vaca Moxie member becomes | 1 tele anne) | dt feount «= Ageount Types provecand | odace Preto Putchantpeotave i em fanction kn 246 whieh accepts an integer 2D 3. (a) Write a fanetion In Se cst count Nalance’s fount <= balances » Anow code? class livingbeing { he questions (2) 40 (9) char specification [20] ; int averagenge : public : void rend ( ); void show ( ) ve class apecprivate livingbeing O) int no_of_organs, no_of bones ; ig level 5 readape( ); . void showape ( ); vi class human : public ape w char race [20] ; char habitation [30] ; public void readhuman ( void showhuman ( ) Ans. (a) de : (Name the members which can be accessed from the member functions of class human, (ii) Name the members, which can be accessed by-an object of elace human (Gil) What will be the size of an object (in bytes) of, lass human? the class (es) that can access read ( ) declared igbeing class. ‘What is protected access mode in OOP? Data Members: intiq_level; char race [20}; 5 char habitation [30]; ‘Member Functions: void readape(): void showape(); void readhuman(); void showhuinan(); Member Functions: oid readape(), void showapet); void readhuman(); void showhuman(); o ww © w@ i i) 78 bytes (iv) Member Functions: void readape(s void showape() (9) Protected visibility mode: The protected derivation ‘means thal the derived class can access the public and private members of the base class protected. With protected by derived class, the public and protected embers ofthe base class Become protected members ofthe derived elas. That means he inherited members are now not available tothe outside world and can be accessed only though the member functions of the derived class and the clases based upon the derived classes. These members can be inherited further ifany classes are inheriting from the derived class. @ array, lis alze nnd row number #88 the tum of particular rove. 159 26 10 wea array is |S 44 48 12 13 14 15 16. row NUmber is 3. Then 347+ 11+ (5-36. Output i: Sum = 36. etre Sf] [30 stored Inthe memory along the Tivol excnof ihe element occupying 2 bes. Find out the memory location for the element S{15] [5], if oa ten 31) 0] stored athe memory Heaton son, Write a user defined fonction in C++ which intakes Dec dimensona array and sizeof array a8 argurent tna um of clement wich are paste. IPiorarray i 1Os2 Spot 3-46-17 3s than poste aubersin above aray 10,2, 5,23 Summ ioea4s+23=40 Output is 40 Erafunte ine flowing Post expresion showing the Hack contents Bhssn5.4/ Soils ity tint fle, nt) ses ale i cout <<"Sum of " [PIQ]=B + W (C(P-1)+ Q-1)) $500 =Bi2db Goo) Stiboy $500 =B+2( 3020)+(10) 5500 = B+2G0 40) 5500 =B+ 1800 B =3700 SD) =s (15) (5) =B+W(C(L) +4) = 3700 + 2(30 (15.0) +45.0) = 3700+ 2G0(15) + (15)) =3700+230* 20) = 370042 * 600 =3700+ 1200 = 4900. yo sumofpos Gt fiat) ints-0; for (in(i=0; in i++) fi ital i po) ssstali fy ‘out <<"Sum of +ve Nos." <> memno >> outamt;——) void put it( ) {count << memno << outamt ; 1 int returnamt( ) ("return outamt; hi ~ Write a function in C++ to write objects havin oytamt more than Rs, 10,000 into CRITICAL,DAT file, ae seekg (35, 15); ~ ifsiream F; F seekg (35, 15); void countline () ifseam FIL ("chapter ines =0; char st [80]; while FIL, gtline(st,80)) lines; cout<1060) Tout iie((char*) Rob} sizeof(bj)); ) fin.ctoset), fout.close(); } What is data independence’ Independence different independence? al data from physical data o Ans, (8) ©) MPLOYER and DESI ments (iy to Civ) and Conslier the fal Write SOL, command for th rimonte wesmaue | psmaMe | cate wee eae Les | ane : evens | wea to we nea veut] Br eka Sm thnuire | wacuaneren, 3 | en | wats] wos too non —| tre] mee rome ii | par] thowraon | ram DET wo. sata pesionaTIon | =| sean | ie os tna fo ja [ronmo_“| terno_| nanacer [aio s100 Pasa | waa [255___ | sov00 42000 300 | atom” oan, [ass [avooo 10090. “co” | Sz000 7200 SALES ie | roca [500 | Saueswan () Display First Name and City of Employee hai salary between £0,000 and 90,000, (ii) Display details of Employees who are from PARIS" city. Increase the benefits of employee having W_ID = 210 by 00. (is) Count number of employees whose name starts from character 'S'. (0), Select MAX (salary) from DESIG (i) Select First Name from employee, design where “designation = 'MANAGER’ and employee, W_ID sig. W_ID. (vi) Select’ COUNT (DISTINCT designation) from DESIG. Select designation, SUM (salary) from DESIG. Group by designation having count (* )> Date Independence: The separation of metadata (data description) from the application programs that use the data is called data independence. In the database environment, iallows for changesat one level ofthe database ‘without affecting other levels. These changes are absorbed by the mappings between the levels. This property of data systems allows an organisation's datato change and evolve (within limits) without changing the application programs that process the data, Jn physical data independence, the conceptual schema in sulates the users from changes in the physical storage ofthe data. Changes o the internal schema, such as using different file organisations or storage structure, using different storage devices, modifying indexes or hashing algorithms, must be possible without changing the'conceptual ar external Schemas. In logical data independence, the users are shielded from changes in te logical structure ofthe data or changes inthe shoie of relations tobe stored. Changes to he conceptual (seletesfirstname, ecity from employee edesig d Where e.w_id = dhy_id and (salary>=50000 and dsalary<=90000) (i)_ select ea id. firstname, elastname,e.city, d salary, A.benefits, d.désignation from employee e.desig d where e._id=div_id and e.city~pans {ii updatedesig et beneis=benefseSO0 Where vid (iv) select count(firstname) from employee Where firstname Tike S96 (¥) output: 5000 Q6. o @ @ Ans. (0) © © @ Q7. (a) 0 © San (1) output Manila George (si utp 4 (si outpur cletk 138000 Manager 220000 State Involution Law and verify the same uslng truth, table. Write the Produet of Sum from the function F ‘Truth table representation of F fs given belo XTYIZTF. ofototo otetete oti foto otttte Ans. (9) vtotets oto otrtepo ate Write the equivalent Boolean Expression for the following Logie Cireuit: S © [Reduce the following Boolean Expression wing K-Map: SS F(A,BC.0) = 91(0,244,5,6,7,8,10,13,15) (Kr V+ 214 ZK VAZ IY 'Z) ABC+EC Result. 0 +AB+BD Write one advantage and Topology. Differentiate between HTML and XML. ‘Standard Bank bas set up its new centre in India for its office and web based activities. It has five buildings as shown in the diagram below: ) ) wy Sa ale oro hulldl9gs ost sultable place (0 instay (1), Suggest tee egantaation with a suitable yeylt cay Area ine placement of the following Sue ont (a) Hub Switch (0) Moder rants to link its head office (iv) The company, wae te Sydney. rd ie iy building te ype of transmission mediy (werent for such a ink? t 0 reeerspe of network does this consetig Fesult ino? ing Topoltags ALAN using the rng topology. sgn Aner Tians th fing. The destination station copies the soe ritogncing is address on the packet ARe® conn eels all ct, tisremovedalthesoue gagst Feeee cab length and simple writing layout 2. ResiontArchtecture Disadvanges 1 tags ie, 2 Faultisobttonis diese Firat Hyper Tex Markup Language isa document iyng tndhyperlin specication language, ued for celine ae IL: XML isa eXtensible Markup Language for documents containing structured information. In HIME both ag semantics and log set are fixed but, XML speci neither semantics nor tagset. Rather it provides afacityi define tags and relationships among them, (0.7 The possible cable layouts can be Waa (Foal cable length Fauied Vo connect buildings ta Be ete ee Q AO8 Coat ‘able length required To connected buildings = 188 Thicknet coax cable as these can su; networks of uplo 500 meters (1640 f.) ae 7 (2) In both above the layouts, a hub/switch each would be ‘needed in all the buildings, to interconneet the group of {bles from the different computers in each building, ® a is placed in building B ) Sustiear eee mbuling (8) WAM Cie ea te A le

You might also like