Trending ▼   ResFinder  

CBSE Class 12 Pre Board 2019 : Computer Science (St Xavier's Sr. Sec. School, Delhi)

7 pages, 61 questions, 0 questions with responses, 0 total responses,    0    0
CBSE 12 Pre Boards
  
+Fave Message
 Home > cbse12_pre_boards >   F Also featured on: School Page cbse12

Formatting page ...

ST. XAVIER S SR. SEC. SCHOOL, DELHI-110054 Std.12 03-01-2019Pre Board Exam in Computer Science 1. a) Time: 3 hrs. M. Marks: 70 Rewrite the following program after removing syntax error(s) if any in the following program segment. [2] void main( ) int A[10]; A=[39,-45]; for( p = 0; p<=6; p++) { if(A[p]%2=0) int S = S+A[p];} cout<<S;} b) Write the output of the following program segment (assume all necessary header files are included) [2] void func(char s[]) { for (int i=0;s[i]!='\0';i++) { if(((i%2)!=0) &&(s[i]!=s[i+1])) { s[i]='@'; } else if (s[i]==s[i+1]) { s[i+1]='!'; i++; } }} void main() { char s[]="ACCESS"; cout<< Original String <<s; func(s); cout<<"Changed String"<<s; } c) Find out the output of the following program segment [3] void main( ) { intAr[ ] = { 6 , 3 , 8 , 10 , 4 , 6 , 7} ; int *Ptr = Ar , I ; cout<<++*Ptr<< '@' ; I = Ar[3] - Ar[2] ; cout<<++*(Ptr+I)<<'@'<<"\n" ; cout<<++I + *Ptr++ << '@' ; cout<<*Ptr++ <<'@'<< '\n' ; for( ; I >=0 ; I -=2) cout<<Ar[I] << '@' ; } d) Observe the following program and find out, which output(s) out of (i) to (iv) willbe expected from the program? What will be the minimum and the maximum value assigned to the variable Alter? [2] Note: Assume all required header files are already being included in the program. void main( ) { randomize(); intAB[]={10,7}, NO; int A=random(2) + 10 ; for (int C=0;C<2;C++) { NO=random(2) ; cout<<AB[N] +A<< # ; } } (i) 21#20# (ii) 20#18# (iii) 20#17# (iv) 21#17# e) Observe the following program very carefully and write the name of those header file(s), which are essentially needed to compile and execute the following program successfully: [1] void main() { char text[20], newText[20]; gets(text); strcpy(newText,text); for(inti=0;i<strlen(text);i++) if(text[i] = = A ) Std. 12 -2- Computer Science text[i] = text[i]+2; puts(text); } f) What is a function prototype? How it is helpful? Explain with some suitable example [2] 2. a) Answer the questions (i) and (ii) after going through the following class : [2] class Exam { int Rollno; char Cname[25]; float Marks ; public : Exam( ) //Function 1 { Rollno = 0 ; strcpy(Cname, ); Marks=0.0; } Exam(int Rno, char candname[ ]) //Function 2 { Rollno = Rno ; strcpy(Cname,candname); } ~Exam( ) //Function 3 { cout << Result will be intimated shortly << endl ; } void Display( ) //Function 4 { cout << Roll no : <<Rollno; cout<< Name : <<Cname; cout << Marks: <<Marks; }}; (i)What is Function 3 called? When will it be invoked? (ii) Write definition of copy constructor of above class and its invoking statement also? OR Write any two differences between Constructor and Destructor with reference to Object Oriented Programming b) What is a copy constructor? Illustrate with a suitable C++ example. [2] c) Define a class Electricity in C++ with the following descriptions: [4] Private members: Custname of type character array Meternumberof type long UnitsConsumedof type integer Amount of type float. Calc_Amount( )This member function should calculate the amount as No_of_units*Cost . Amount can be calculated according to the following conditions: No_of_units Cost First 50 units Free Next 100 units 0.80 @ unit Next 200 units 1.00 @ unit Remaining units 1.20 @ unit Public members: * A function Input( ) which allows user to enter Custname, Meternumber, Unitsconsumed and invoke function Calc_Amount(). * A function Print( ) to display the values of all the data members on the screen. d) Given the following class definition answer the question that is follow: [4] class University { char name [20]; protected : char vc[20]; public : void estd(); void inputdata(); void outputdata(); } class College : protected University { int regno; protected: Std. 12 -3- Computer Science char principal[20]; public : int no_of_students; void readdata(); void dispdata ( ); }; class Department : public College { char name[20]; char HOD[20]; public : void fetchdata(int); void displaydata( ); } i) Name the base class and derived class of College ii) Name the data member(s) that can be accessed from function displaydata(). iii)What type of inheritance is depicted in the above class definition? iv) Write the function names which is directly accessible from the object of Department Class OR Consider the following class State : class State { protected : inttp; public : State( ) { tp=0;} void inctp( ) { tp++; } intgettp(); { returntp; } }; Write a code in C++ to publically derive another class District with the following additional members derived in the public visibility mode. Data Members : Dname string Distance float Population long int Member functions : DINPUT( ) : To enter Dname, Distance and population DOUTPUT( ) : To display the data members on the screen. 3. a) Write a user-defined function AddEnd4(intA[][4],intR,int C) in C++ to find and display the sum of all the values, which are ending with 4 (i.e., unit place is 4). For example if the content of array is: 2 1 1 4 6 4 1 5 4 9 The output should be 42 [2] OR Write a user defined function in C++ to find the sum of both left and right diagonal elements from a two dimensional array. b) Write a user-defined function EXTRA_ELE(int A[ ], int B[ ], int N) in C++ to find and display the extra element in Array A. Array A contains all the elements of array B but one more element extra. (Restriction: array elements are not in order) [3] Example: If the elements of Array A is 14, 21, 5, 19, 8, 4, 23, 11 and the elements of Array B is 23, 8, 19, 4, 14, 11, 5 Then output will be 21 OR Write a user defined function Reverse(int A[ ],int n) which accepts an integer array and its size as arguments(parameters) and reverse the array. Example : if the array is 10,20,30,40,50 then reversed array is 50,40,30,20,10 c) An array S[10] [30] is stored in the memory along the column with each of its element occupying 2 bytes. Find out the memory location of S[5][10], if element S[2][15] is stored at the location 8200. [3] OR Std. 12 -4- Computer Science An array A[30][10] is stored in the memory with each element requiring 4 bytes of storage,if the base address of A is 4500,Find out memory locations of A[12][8], if the content is stored along the row. d) Write a function in C++ to delete a node containing student information, from a dynamically allocated stack of students implemented with the help of following structure. [4] struct student { int Admno ; char studentName[20]; student *next; }; OR Write the definition of a member function insert_player() for a class queue in C++, to add a player in a statically allocated queue of players. Consider the following class definitions struct player { int pno ; char playerName[30]; }; const int size = 10; class queue{ player Ar[size]; int front, rear; public: queue() { front = rear = -1 } void insert_player() ; void remove_player() ; void display() ; } e) Convert the following infix expression into its equivalent postfix expression using stack Exp = ( A-B) + C/D*E [2] OR Evaluate the following postfix expression using stack 470,5,4,^,25,/,6,* 4. a) Write a finction LineCount( ) in c++ that read a text file YourText.txt and count total number of lowercase alphabets present in this file. [2] OR Write a function RevText() to read a text file Input.txt and Print only word starting with I in reverse order . Example: If value in text file is: PROUD OF IT Output will be: PROUD OF TI b) Write a function SearchDestination() in C++ that search and display the details of all those trains whose destination is Delhi from the binary file Trains.dat . Assuming that the binary file contains the object of following class. [3] class Trains { int trno ; char destination[30]; float fare; public: char * retDest () { return destination ; } void input ( ) ; // member function to read data from keyboard void output( ) ; // member function to show data on the screen }; OR Write a definition for a function TotalTeachers( ) in C++ to read each object of a binary file SCHOOLS.DAT, find the total number of teachers, whose data is stored in the file and display the same. Assume that the file SCHOOLS.DAT is created with the help of objects of class SCHOOLS, which is defined below : class SCHOOLS { intSCode; //School Code char SName[20]; //School Name intNOT; //Number of Teachers in the school public: void Display() {cout<<SCode<<"#"<<SName<<"#"<<NOT<<endl;} intRNOT(){return NOT;} }; c) Find the output of the following C++ code considering that the binary file SCHOOLS.DAT exists on the hard disk with the following records of 10 schools of the class SCHOOLS as declared in the previous question (4 b). Std. 12 -5Computer Science SCode SName NOT 1001 Brains School 100 1003 Child Life School 115 1002 Care Share School 300 1006 Educate for Life School 1005 Guru ShishyaSadan 195 1004 Holy Education School 140 1010 Play School 1008 Innovate Excel School 300 1011 Premier Education School 200 1012 Uplifted Minds School 100 [1] 50 95 void main() { fstream SFIN; SFIN.open("SCHOOLS.DAT",ios::binary|ios::in); SCHOOLS S; SFIN.seekg(5*sizeof(S)); SFIN.read((char*)&S, sizeof(S)); S.Display(); cout<<"Record :"<<SFIN.tellg()/sizeof(S) + 1<<endl; SFIN.close(); } 5. a) What is cartesian product ? Explain with some suitable example. [1] b) A table Passenger has 4 rows and 5 columns. What is the degree and cardinality of this table. [1] c) Observe the following tables carefully and write SQL queries for (i) to (iv) and find output for SQL queries (v) to ( viii) [6] Table : Student Admno Fees Name Stream Class Gender TrainerID 101 1205 Samriddhi Science 12A F 10 102 1250 Manan Singh Commerce 12B M 20 103 950 Swapnil Humanities 11A M 10 104 750 Diksha Singh Science 12A F 30 105 1450 Dhirendra Science 10a M 40 Table : Trainer TrainerID TrainerName Game Name 10 Rakesh Kumar Judo 20 Mayank Sharma Boxing 30 Vikas Sharma VolleyBall 40 Deepak Rawat Sketing i) Display the details of all female students in ascending order ( according to stream ) ii) Display details of student name, stream, class and trainer name from the above tables iii) Show the list of all the students whose name start with alphabet A iv) Display the details of all those students who is taking training in Boxing v) SELECT * FROM STUDENT WHERE GENDER = m ; vi) SELECT DISTINCT(STREAM) FROM STUDENT; vii) SELECT MAX(FEES) ,STREAM FROM STUDENT GROUP BY STREAM; viii) SELECT MIN(FEES) FROM STUDENT WHERE NAME LIKE %ri% AND GENDER = F ; 6. a) State and verify Associative law using Truth Table. b) Draw the Logic Circuit of the following Boolean Expression: ((U + V ).(U + W)). (V + W ) [2] [2] c) Derive a Canonical SOP expression for a Boolean function F(X,Y,Z) represented by the following truth table: Std. 12 -6- [1] Computer Science X Y Z F(X,Y,Z) 0 0 0 1 0 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 d) Obtain a simplified form for a Boolean expression using K-map: F (U, V, W, Z) = II (0, 1, 3, 5, 6, 7, 15) [3] 7. a) Arun opened his e-mail and found that his inbox was full of hundreds of unwanted mails. It took him around two hours to delete these unwanted mails and find the relevant ones in his inbox. What may be the cause of his receiving so many unsolicited mails? What can Arun do to prevent this happening in future? [2] b)Assume that 50 employees are working in an organization. Each employee has been allotted a separate workstation to work. In this way, all computers are connected through the server and all these workstations are distributed over two floors. In each floor, all the computers are connected to a switch. Identify the type of network? [1] c) Your friend wishes to install a wireless network in his office. Explain him the difference between guided and unguided media. [1] d) Write the expanded names for the following abbreviated terms used in Networking and Communications: [2] (i) CDMA (ii) HTTP (iii) XML (iv) URL e) Multipurpose Public School, Bangluru is Setting up the network between its Different Wings of school campus. There are 4 wings named as SENIOR(S), JUNIOR(J), ADMIN(A) and HOSTEL(H). Multipurpose Public School, Bangluru [4] SENIOR JUNIOR ADMIN HOSTEL Distance between various wings are given below: Wing A to Wing S Wing A to Wing J Wing A to Wing H Wing S to Wing J Wing S to Wing H Wing J to Wing H 100m 200m 400m 300m 100m 450m Number of Computers installed at various wings are as follows: Wings Number of Computers Wing A 20 Wing S 150 Wing J 50 a) Suggest the best wired medium and draw the cable layout to efficiently connect various wings of Multipurpose PublicSchool, Bangluru. b) Name the most suitable wing where the Server should be installed. Justify your answer. c) Suggest a device/software and its placement that would provide data security for the entire network of the School. d) Suggest a device and the protocol that shall be needed to provide wireless Internet access to all smartphone/laptop users in the campus of Multipurpose Public School, Bangluru. ***********

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : cbse pre boards, prelims 2015 - 2016, preliminary examinations, central board of secondary education, india schools, free question paper with answers, twelfth standard, xiith std, board exams, mock, model, sample, specimen, past, free guess papers.india, delhi, outside delhi, foreign, cbse class xii, cbse 12, 12th standard, cbse papers, cbse sample papers, cbse books, portal for cbse india, cbse question bank, cbse question papers with answers, pre board exam papers, cbse model test papers, solved board question papers of cbse last year, previous years solved question papers, free online cbse solved question paper, cbse syllabus, india cbse board sample questions papers, last 10 years cbse questions papers, cbse important questions, specimen / mock papers.  

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

 

cbse12_pre_boards chat