Trending ▼   ResFinder  

CBSE XII Pre Boards 2015 : COMPUTER SCIENCE (KV Kolkata)

11 pages, 47 questions, 14 questions with responses, 16 total responses,    0    0
Kendriya Vidyalaya No.1 Salt Lake
Kendriya Vidyalaya (KV) No. 1, Salt Lake
+Fave Message
 Home > kv_kendriya_vidyalaya_salt_lake >   F Also featured on: rahulghadai

Formatting page ...

KendriyaVidyalayaSangathan Kolkata Region Third Pre-Board Examination : 2014-15 Please check that this question paper contains 7 questions. Please write down the Serial Number of the question before attempting it. 15 minutes time has been allotted to read this question paper. The students will read the question paper only and will not write any answer on the answer-book during this period. COMPUTERSCIENCE Time allowed : 3 hours Class : XII Maximum Marks : 70 Note : (i) All questions are compulsory. (ii) Answer the questions after carefully reading the text. 1. (a) What is the difference between local variable and global variable ? Also, 2 give a suitable C++ code to illustrate both. (b) Name the inbuilt function and the related header file that is used to 1 change lower case to upper case letter. (c) Aashu has just started working as a programmer in ZENITH SOFTWARE Company. In the company she has got her first assignment to be done using a C++ to reverse words of a string individually. But she has committed some mistakes while writing the code and is not getting the desired result. Rewrite the correct code underlining the corrections done. 2 For example, if user enter : computer science it should display : retupmocecneics #include<iostream.h> #include<string.h> void main( ){ inti, k = 0; char str[80]; word[80]; cout<< Enter any string (max. 80 chars) <<endl; gets(str); strcat(str, ); for(i=0; str[i]!= \0 ;i++){ Page 1 of 11 } if(str[i]!= ) word[k] = str[i]; k=k+1;} else{ while(k>0){ cout<<word[--k];} cout<<str[i]; } (d) Find the output of the following program : 2 #include<iostream.h> void main( ){ int Data[ ] = { 4, 6, 10, 12}; int *arrange = Data; for(int k=1; k<=3; k++){ cout<<*arrange<< @ ; arrange++; } cout<<endl; for(k=1; k<=4; k++){ (*arrange)* = 3; --arrange; } for(k=1; k<5; k++) cout<<Data[k-1]<< % ; cout<<endl; } (e) Obtain the output from the following C++ program as excepted to appear 3 on the screen after its execution. #include<iostream.h> structMyBox { int Length, Breadth, Height; }; void Dimension(MyBox M) { cout<<M.Length<< x <<M.Breadth<< x ; cout<<M.Height<<endl; } void main( ) { MyBox B1 = { 10, 15, 5 }, B2, B3; ++B1.Height; Dimension(B1); B3=B1; ++B3.Length; B3.Breadth++; Dimension(B3); B2 = B3; Page 2 of 11 B2.Height+ = 5; B2.Length--; Dimension(B2); } (f) Read the following C++ code carefully and find out of the given options (i) 2 to (iv) are the expected correct output(s) of it. Also, justify the answer. #include<iostream.h> #include<stdlib.h> constint Check = 15; void main( ) { randomize( ); int Option = 5, Value; for(int z=1; z<=4; z++) { Value = Check + random(Option); cout<<Value<< % ; Option--; } } (i) (ii) (iii) (iv) 19%16%15%18% 14%18%15%16% 19%16%14%18% 19%16%15%16% 2. (a) How do abstraction and encapsulation complement each other? Write an 2 example using C++ to illustrate the concept. (b) Answer the following questions (i) and (ii) after going through the 2 following class : class Program { intTimeLimit; //In Hours public: Program( ) //Function 1 { TimeLimit = 8; cout<< Inauguration <<endl; } ~Program( ) //Function 2 { cout<< Valedictory Function <<endl; } void Session(int S=1) //Function 3 { cout<< Session <<S<< is on <<endl; } Program(intTimeLimit) //Function 4 Page 3 of 11 { Time = TimeLimit; cout<< Inauguration <<endl; } }; (i) In Object Oriented Programming, what is Function 2 referred to as and when does it get invoked / called ? (ii) In OOP, which concept is illustrated by Function 1 and Function 4 together ? (c) Define a class Admission in C++ with the following description : Private Data Members AdmNo Name Percent Stream - to to to to store store store store 4 Admission Number of type long Applicant s Name of type string Percentage of marks of type float Stream of type string Private Member Functions A member function AdmStream( ) to find the Stream as per the Percentage obtained by a student. Equivalent Percentage range and the respective stream is shown as follows : Percentage Stream >=70 Science less than 70 and >=50 Commerce less than 50 and >=33 Humanities less than 33 Not Applicable Public Member Functions A function Registration( ) to allow user to enter values for AdmNo, Name and Percent. Also, this function should call AdmStream( ) to assign Stream. A function Display( ) to allow user to view the content of AdmNo, Name, Percent and Stream on screen. (d) Consider the following C++ code and answer the questions from (i) to (iv) 4 : class Publisher { long PID; //Publisher Identification Number char PName[20]; protected : char Description[40]; void Allocate( ); public : Publisher( ); void Assign( ); void Show( ); }; class Branch { Page 4 of 11 int BID; //Branch Identification Number char BName[20]; protected : char Address[30]; public : Branch( ); void Input( ); void Output( ); }; class Author : private Publisher, public Branch { int AID; //Author Identification Number char City[20], Country[20]; public : Author( ) void Enter( ); void Display( ); }; (i) Which type of Inheritance is shown in the above example ? (ii) Write the names of those member functions, which can be directly accessible from the objects of class Author. (iii) How many bytes will be required by an object belonging to class Author ? (iv) Write the names of all members, which are accessible from member functions of class Branch. 3. (a) Write code for a function void Transfer(intArr[ ], int size) in C++, to divide all those array elements by 7 which are divisible by 7 and multiply other 3 array elements by 3. Example : If the original content of the array Arr is Arr[0] Arr[1] Arr[2] Arr[3] Arr[4] 21 12 35 42 18 The modified content will be : Arr[0] Arr[1] Arr[2] Arr[3] Arr[4] 3 36 5 6 54 (b) An array A[40][30] is stored along the row in the memory with each element requiring 4 bytes of storage. If the base address of the very first element of A is 4500, find out the location of A[10][20]. Also find the total 3 number of bytes required by the array A in the memory. (c) Write a user defined function DispRowCol(int A[ ][3], int S, int R) in C++ Page 5 of 11 to display all alternate elements from two-dimensional array A. (Starting 2 from A[0][0]). For example if the content of 2D array of dimension 3 3 is : 12 45 67 33 90 76 21 43 59 The output should be : 12 67 90 59 (d) Evaluate the following postfix notation of expression : 15 3 2 + / 7 + 2 * 2 (e) Write a function in C++ to delete an element into dynamically allocated 4 Queue where each node contains a real number as data. Assume the following definition of NODE for the same : struct NODE { float num; NODE *Link; }; 4. (a) Observe the program segment given below carefully and the questions 1 that follow: class Stock { intIno, Qty ; char Item[20]; public: void Enter() { cin>>Ino; qets(Item); cin>>Qty; } void Issue(int Q) { Qty+=O; } void Purchase(int Q) { Qty-=Q; } intGetIno () { return Ino; } Page 6 of 11 }; void PurchaseItem(intPino,intPQty) { fstream File; File.open("STOCK.DAT", ios::binary|ios::in|ios::out); Stock S; int Success=0; while (Success==0&&File.read((char*)&S,sizeof(S))) { if (Pino==S.GetIno()) { S.Purchase(PQty); _________________ // Statement 1 _________________ // Statement 2 Success++; } } if (Success==1) cout<<"Purchase Updated"<<endl; else cout<<''Wrong Item No"<<endl; File.close() ; } (i) Write statement 1 to position the file pointer to the appropriate place so that the data updation is done for the required item. (ii) Write statement 2 to perform the write operation so that the updation is done in the binary file. (b) Write a function in C++ to read the content of a text file "KOLKATA.TXT' anddisplay all those lines on screen, which are either starting with 'S' or 2 startingwith 'M'. (c) Write a function in C++ to search for the details (PhoneNum and Calls) ofthose Phones, which have more than 800 calls from a binary file "Phone.dat". Assuming that this binary file contains records/objects of 3 class Phone, whichis defined below : class Phone { char PhoneNum[10]; int Calls; public: void Get( ) { gets(PhoneNum); cin>>Calls; } void Billing() { Page 7 of 11 }; cout<<PhoneNum<<"#"<<Calls<<endl; } intGetCalls() { return Calls; } 5. (a) A table 'game1' has 3 columns and 20 rows and another table 'game2' has the same column as game1 and 15 rows. 5 rows are common in both the table. If we take union, what is the degree andcardinality of the resultant 2 table? Note : Answer the questions (b) and (c) on the basis of the following tables Students and Streams (b) Write MYSQL queries for the following: 4 (i) To display Students' information in ascending order using Name. (ii) To display Adno, Name, Sex and Average from Student's table and Stream name(Sname) and Place from Stream table with respect to Scode. (iii) To add the following information into the student table. 999 Deepak Sharma 83 M 2222 Page 8 of 11 (iv) To display Science Stream Students' information. (c) Write the output of the following SQL commands: (i) 2 SELECT SUM(Average) FROM Students WHERE Sex = M ; (ii) SELECT DISTINCT(Scode) FROM Students; (iii) SELECT Place, COUNT(*) FROM Streams GROUP BY Place; (iv) SELECT Name, Average*10 Scode IN ( 111 , 444 ); TOTAL FROM Students WHERE 6. (a) Prove the following Boolean Expression : (a' + b') . (a' + b) . (a + b') = a' . b' (b) Obtain the Boolean Expression for the logic circuit shown below : 2 2 (c) Write the Sum of Product form of the function X(A, B, C) for the following 1 truth table : (d) Obtain the minimal form for the following Boolean Expression using 3 Karnaugh s Map : F(A, B, C, D) = (1, 3, 4, 5, 6, 7, 12, 13) Page 9 of 11 7. (a) Two students in the same class sitting inside the same room have connected their laptops usingBluetooth for working on a group 1 presentation. What kind of network have they formed? (b) What do you mean by a modem?Why is it used? 1 (c) Expand the following : 1 TCP VoIP (d) Mr. Rohan wants to prevent unauthorized access to/from his company's local area network. Write thename of the system, which he should install 1 to do the same. (e) Expertia Professional Global (EPG) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Kolkata. As a network adviser, you have to understand their requirement and suggest to them the best available solutions. Their queries are mentioned as (i) to (iv) below : Page 10 of 11 (i) What will the most appropriate block, where EPG should plan to install their server ? 1 1 1 1 (f) (g) 1 1 Page 11 of 11

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Sarvani

(9)

Aman Almadi

(2)

Bandhan

(1)

Shivam Dwivedi

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

Additional Info : KV Sangathan, Kolkata Region COMPUTER SCIENCE Pre-Board
Tags : kendriya vidyalaya kv no. 1 salt lake, kendriya vidyalaya sangathan, kolkata region, west bengal, cbse pre boards, prelims preliminary exams, cbse specimen / guess / mock papers / books, cbse india portal, central board for secondary education, answer keys, top schools, cbse question bank, cbse model test papers with answers, solved question papers of cbse last year, previous years papers with solutions, free download pdf online cbse paper, cbse syllabus, pattern, dates notification, application forms, india cbse board sample last 10 years, how to prepare, 2015, 2014.  

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

kv_kendriya_vidyalaya_salt_lake chat