CBSE Computer Science Board paper 2011

Add to Favourites
Post to:

1 COMPUTER SCIENCE-2011 Time allowed : 3hours] [Maximum Marks :70 Instructions (i) All questions are compulsory (ii) Programming Language : C++ 1. (a) What is the difference between Local Variable and Global Variable ? Also, give suitable C++ code to illustrate both. 2 (b) Write the names of the header files, which is/are essentially required to run/execute the following C++ code: 1 void main () { char C, String [] = “Excellence Overload”; for (int I=0; String [I] ! = „\0‟;I++} if (String [I] == „ ‟) cout< void ChangeArray (int Number, int ARR[], int Size) { for (int L=0; L void main ( ) { int Track [] = {10,20,30,40,}, *Striker ; Striker=Track ; Track [1] + = 30 ; cout<<“Striker>”<<*Striker< #include void main ( ) { randomize (); int Guess, High=4 ; Guess=random (High) +50; for (int C=guess ; C<=55 ; C++) cout< void Print ( ) //Function [I] { for (int K=1;K<=60; K++) cout<< “-”; cout<=50 Selected less than 50 Not selected Public members  A function ENTER( ) to allow user to enter values for RNo, Name, Score & call function AssignRem() to assign the remarks.  A function DISPLAY( ) to allow user to view the content of all the data members. (d) Answer the question (i) to (iv) based on the following: 4 class Student { int Rno; char Name[20]; float Marks; protected: void result( ); public: Student ( ); void Register ( ); void Display( ); }; class Faculty { long FCode; char FName [20]; protected: float Pay; public: Faculty ( ); void Enter( ); void Show( ); }; class Course: public Student, private Faculty { long CCode [10]; char CourseName [50]; 5 char StartDate [8], EndDate [8]; public: Course( ); void Commence ( ); void CDetail ( ); }; (i) Which type of inheritance is illustrated in the above C++ code? (ii) Write the names of all the data members, which is /are accessible from member function Commence of class Course. (iii) Write the names of member functions, which are accessible from objects of class Course. (iv) Write the names of all the members, which are accessible from objects of class faculty. 3. (a) Write a Get1From2( ) function in C++ to transfer the content from two arrays FIRST[ ] and SECOND[ ] to array ALL[ ]. The even places (0, 2, 4,…) of array ALL[] should get the content from the array FIRST[ ] and odd places (1,3,5,…) of the array ALL [ ]should get the content from the array SECOND[ ] . 3 Example: If the FIRST[ ] array contains 30, 60, 90 And the SECOND[ ] array contains 10, 50, 80 The ALL[ ] array should contain 30, 10, 60, 50, 90, 80 (b) An array P[20] [50] is stored in the memory along the column with each of its Element occupying 4 bytes, find out the location of P[15] [10], if P[0][0] is stored at 5200. 3 (c) Write a function in C++ to Perform insert operation on a dynamically allocated Queue containing Passenger details as given in the following definition of NODE. 4 struct NODE { long Pno; //passenger number char Pname[20]; //passenger name NODE *Link; }; 6 (d) Write a COLSUM ( ) function in C++ to find sum of each column of each column of a NxM matrix. 2 (e) Evaluate the following postfix notation of expression : 50, 60, +,20, 10, -, * 2 4. (a) Observe the program segment given below carefully and fill the blanks marked as Statement 1 and Statement 2 using seekg( ), seekp( ), tellp( ) and tellg() functions for performing the required task. 1 # include class PRODUCT { int Pno; char pname [20]; int qty; public : : void ModifyQty ( ); //The function is to modify quantity of a PRODUCT }; void PRODUCT :: ModifyQty ( ) { fstream Fil; Fil.open (“PRODUCT.DAT” , ios : : binary | ios : : in | ios : : out); int MPno; cout<<“Product No to modify quantity :”; cin>>MPno; while( Fil.read ((char*) this, sizeof (PRODUCT))) { if (MPno ==Pno) { cout<<“present quantity:” <>Qty; int position = ________; //Statement 1 ___________________; //Statement 2 Fil.write ((char*) this, sizeof (PRODUCT)); //Re-writing the Record } } Fil.close( ); } (b) Write a function in C++ to count the no. of “Me” or “My” words present in a text file “DIARY.TXT”. 2 If the file “DIARY.TXT” content is as follows : My first book was Me and My family. It gave me chance to be 7 known to the world. The output of the function should be Count of Me/My in file : 4 (c) Write a function in C++ to search for a laptop from a binary file “LAPTOP.DAT” containing the objects of class LAPTOP (as defined below). The user should enter the Model No and the function should search and display the details of the laptop. 3 class LAPTOP { long ModelNo; float RAM, HDD; char Details[120]; public: void StockEnter ( ) {cin>>Model No>>RAM>>HDD; gets(Details);} void StockDisplay( ){cout<SQL commands for the following statements: 4 (i) To display the details of all WORKERs, descending order of DOB. (ii) To display NAME and DESIG of those WORKERs whose PLEVEL is either P001 or P002. 8 (iii)To display the content of all the WORKERs table, whose DOB is in between „19-JAN-1984‟ and 18-JAN-1987‟. (iv) To add a new row with the following : 19, „Days Kishore‟, „Operator‟, „P003‟. „19-Jun-2008‟, „11-Jul-1984‟ (c) Give the output of the following SQL queries : 2 (i) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL; (ii) SELECT MAX(DOB), MIN(DOJ) FROM WORKER; (iii) SELECT Name, Pay FROM WORKER W, PAYLEVEL P WHERE W.PLEVEL = S.PLEVEL AND P.ECODE<13; (iv) SELECT PLEVEL, PAY+ALLOWANCE FROM PAYLEVEL WHERE PLEVEL = „P003‟; 6. (a) Verify the following using Truth Table 2 U.(U‟ + V) = (U+V) (b) Write the equivalent Boolean Expression for the following Logic Circuit. 2 (c) Write the POS form of a Boolean function F, which is represented in a truth table as follows: 1 A B C D 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 (d) Reduce the following Boolean Expression using K-Map : F(P, Q, R, S) = ∑ (0, 1, 2, 4, 5, 6, 8, 12) 3 9 7. (a) Differentiate between packet switching and message switching technique in network communication. 1 (b) Differentiate between BUS and STAR topology of networks. 1 (c) What is VoIP ? 1 (d) Out of the following, identify client side script(s) and server side script(s). (a) ASP (b) Javascript 1 (c) VBscript (b) JSP (e) Quick Learn University is setting up its Academic blocks at Prayag Nagar and planning to set up a network. The university has 3 academic blocks and one Human Resource Center as shown in the diagram below : 4 Center to center distances between various block/center is as follows : Law Block to Business Block 40 m Law Block to Technology Block 80 m Law Block to HR Center 105 m Business Block to Technology Block 30 m Business Block to HR Center 35 m Technology Block to HR Center 15 m Number of Computers in each of the Blocks /Center is follows : Law Block 15 Technology Block 40 HR Center 115 Business Block 25 (e1) Suggest the most suitable place (i.e. Block /Center) to install the server of this university with a suitable reason. (e2) Suggest an ideal layout for connecting these blocks/center for a wired connectivity. (e3) Which device you will suggest to be placed/installed in each of these blocks/center to efficiently connect all the computers with in these blocks /center. 10 (e4) The university is planning to connect its admission office in the closest big city, which type of network out of LAN, MAN or WAN will be formed? Justify your answer. (f) Which of the following will come under Cyber Crime? i. Theft of a brand new sealed pack laptop ii. Access to a bank account for getting unauthorized Money Transaction iii. Modification in a company data with unauthorized access iv. Photocopying a printed report (g) Compare open source software and proprietary software.

Comments

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy

Your Facebook Friends on WizIQ

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect