SlideShare une entreprise Scribd logo
1  sur  13
Télécharger pour lire hors ligne
CLASS-XII 
COMPUTER SCIENCE 
(Subject Code 083) 
SAMPLE PAPER 2014 - 15 
Time allowed : 3 hours Maximum Marks: 70 
Instructions: (i) All questions are compulsory. 
(ii) Programming Language: Section A C+ +. 
(iii) Programming Language : Section B Python. 
(iv) Answer either Section A or B, and Section C is compulsory. 
Section A (C++) 
Q1. a. Differentiate between ordinary function and member functions in C++. 
Explain with an example. [2] 
b. Write the related library function name based upon the given information in 
C++. 
(i) Get single character using keyboard. This function is available in stdio.h file. 
(ii) To check whether given character is alpha numeric character or not. This 
function is available in ctype.h file. [1] 
c. Rewrite the following C++ program after removing all the syntactical errors (if 
any), underlining each correction. : [2] 
include<iostream.h> 
#define PI=3.14 
void main( ) 
{ float r;a; 
cout<<’enter any radius’; 
cin>>r; 
a=PI*pow(r,2); 
cout<<”Area=”<<a 
} 
d. Write the output from the following C++ program code: [2] 
#include<iostream.h> 
#include<ctype.h>
void strcon(char s[]) 
{ 
for(int i=0,l=0;s[i]!='0';i++,l++); 
for(int j=0; j<l; j++) 
{ 
if (isupper(s[j])) 
s[j]=tolower(s[j])+2; 
else if ( islower(s[j])) 
s[j]=toupper(s[j])-2; 
else 
s[j]='@'; 
} 
} 
void main() 
{ 
char *c="Romeo Joliet"; 
strcon(c); 
cout<<"Text= "<<c<<endl; 
c=c+3; 
cout<<"New Text= "<<c<<endl; 
c=c+5-2; 
cout<<"last Text= "<<c 
} 
e. Find the output of the following C++ program: [3] 
#include<iostream.h> 
#include<conio.h> 
#include<ctype.h> 
class Class 
{ 
int Cno,total; 
char section; 
public: 
Class(int no=1) 
{ 
Cno=no; 
section='A'; 
total=30; 
} 
void addmission(int c=20) 
{ 
section++; 
total+=c; 
} 
void ClassShow() 
{ 
cout<<Cno<<":"<<section<<":"<<total<<endl;
} 
} ; 
void main() 
{ 
Class C1(5),C2; 
C1.addmission(25); 
C1.ClassShow(); 
C2.addmission(); 
C1.addmission(30); 
C2.ClassShow(); 
C1.ClassShow(); 
} 
f. Study the following C++ program and select the possible output(s) from it : 
Find the maximum and minimum value of L. [2] 
#include<stdlib.h> 
#include<iostream.h> 
#include<string.h> 
void main() 
{ 
randomize(); 
char P[]="C++PROGRAM"; 
long L; 
for(int I=0;P[I]!='R';I++) 
{ 
L=random (sizeof(L)) +5; 
cout<<P[L]<<"-"; 
} 
} 
} 
i) R-P-O-R- 
ii) P-O-R-+- 
iii) O-R-A-G- 
iv) A-G-R-M- 
Q2.a. How encapsulation and abstraction are implemented in C++ language? Explain with an example. [2] 
b. Answer the questions (i) and (ii) after going through the following C++ class: [2] 
class Stream 
{ 
int StreamCode ; char Streamname[20];float fees; 
public: 
Stream( ) //Function 1 
{
StreamCode=1; strcpy (Streamname,"DELHI"); fees=1000; 
} 
void display(float C) //Function 2 
{ 
cout<<StreamCode<<":"<<Streamname<<":"<<fees<<endl; 
} 
~Stream( ) //Function 3 
{ 
cout<<"End of Stream Object"<<endl; 
} 
Stream (int SC,char S[ ],float F) ; //Function 4 
}; 
i) In Object Oriented Programming, what are Function 1 and Function 4 combined together referred as? Write the definition of function 4. 
ii) What is the difference between the following statements? 
Stream S(11,”Science”,8700); 
Stream S=Stream(11,”Science”,8700); 
c. Define a class Customer with the following specifications. [4] 
Private Members : 
Customer_no integer 
Customer_name char (20) 
Qty integer 
Price, TotalPrice, Discount, Netprice float 
Member Functions: 
Public members: 
* A constructer to assign initial values of Customer_no as 111,Customer_name as “Leena”, Quantity as 0 and Price, Discount and Netprice as 0. 
*Input( ) – to read data members(Customer_no, Customer_name, Quantity and Price) call Caldiscount(). 
* Caldiscount ( ) – To calculate Discount according to TotalPrice and NetPrice 
TotalPrice = Price*Qty 
TotalPrice >=50000 – Discount 25% of TotalPrice 
TotalPrice >=25000 and TotalPrice <50000 - Discount 15% of TotalPrice 
TotalPrice <250000 - Discount 10% of TotalPrice 
Netprice= TotalPrice-Discount 
*Show( ) – to display Customer details. 
d. Answer the questions (i) to (iv) based on the following code: [4] 
class AC 
{
char Model[10]; 
char Date_of_purchase[10]; 
char Company[20]; 
public( ); 
AC( ); 
void entercardetail( ); 
void showcardetail( ); 
}; 
class Accessories : protected AC 
{ 
protected: 
char Stabilizer[30]; 
char AC_cover[20]; 
public: 
float Price; 
Accessories( ); 
void enteraccessoriesdetails( ); 
void showaccessoriesdetails( ); 
}; 
class Dealer : public Accessories 
{ 
int No_of_dealers; 
char dealers_name[20]; 
int No_of_products; 
public: 
Dealer( ); 
void enterdetails( ); 
void showdetails( ); 
}; 
(i) How many bytes will be required by an object of class Dealer and class Accessories? 
(ii) Which type of inheritance is illustrated in the above c++ code? Write the base class and derived class name of class Accessories. 
(ii) Write names of all the members which are accessible from the objects of class Dealer. 
(iv) Write names of all the members accessible from member functions of class Dealer. 
Q3a) An array T[-1..35][-2..15] is stored in the memory along the row with each element occupying 4 bytes. Find out the base address and address of element T[20][5], if an element T[2][2] is stored at the memory location 3000. Find the total number of elements stored in T and number of bytes allocated to T [3]
b. Write a function SORTSCORE() in C++ to sort an array of structure IPL in descending order of score using selection sort . [3] 
Note : Assume the following definition of structure IPL. 
struct IPL 
{ 
int Score; 
char Teamname[20]; 
}; 
c. Write member functions to perform POP and PUSH operations in a dynamically allocated stack containing the objects of the following structure: [4] 
struct Game 
{ char Gamename[30]; 
int numofplayer; 
Game *next; }; 
d. Write a function in C++ to print the sum of all the non-negative elements present on both the diagonal of a two dimensional array passed as the argument to the function. [2] 
e. Evaluate the following postfix expression. Show the status of stack after execution of each operation separately: 
2,13, + , 5, -,6,3,/,5,*,< [2] 
Q4. a. Write the command to place the file pointer at the 10th and 4th record starting position using seekp() or seekg() command. File object is ‘file’ and record name is ‘STUDENT’. [1] 
b. Write a function in C++ to count and display the no of three letter words in the file “VOWEL.TXT”. [2] 
Example: 
If the file contains: 
A boy is playing there. I love to eat pizza. A plane is in the sky. 
Then the output should be: 4 
c. Given the binary file CAR.Dat, containing records of the following class CAR type: [3] 
class CAR 
{ 
int C_No; 
char C_Name[20]; 
float Milage; 
public: 
void enter( )
{ 
cin>> C_No ; gets(C_Name) ; cin >> Milage; 
} 
void display( ) 
{ 
cout<< C_No ; cout<<C_Name ; cout<< Milage; 
} 
int RETURN_Milage( ) 
{ 
return Milage; 
} 
}; 
Write a function in C++, that would read contents from the file CAR.DAT and display the details of car with mileage between 100 to 150. 
Section B (Python) 
Q1.a) How is a static method different from an instance method? [2] 
b) Name the function / method required for [1] 
i) Finding second occurrence of m in madam. 
ii) get the position of an item in the list 
c) Rewrite the following python code after removing all syntax error(s). Underline the corrections done. [2] 
def main(): 
r = raw-input(‘enter any radius : ‘) 
a = pi * math.pow(r,2) 
print “ Area = “ + a 
d) Give the output of following with justification [2] 
x = 3 
x+= x-x 
print x 
e) What will be printed, when following python code is executed [3] 
class person: 
def __init__(self,id): 
self.id = id 
arjun = person(150) 
arjun.__dict__[‘age’] = 50 
print arjun.age + len(arjun.__dict__) 
Justify your answer.
f) What are the possible outcome(s) expected from the following python code? Also specify maximum and minimum value, which we can have. [2] 
def main(): 
p = 'MY PROGRAM' 
i = 0 
while p[i] != 'R': 
l = random.randint(0,3) + 5 
print p[l],'-', 
i += 1 
i) R - P - O - R - 
ii) P - O - R - Y - 
iii) O -R - A - G - 
iv) A- G - R - M - 
Q2. a) How data encapsulation and data abstraction are implemented in python, explain with example. [2] 
b) What will following python code produce, justify your answer [2] 
x = 5 
y = 0 
print ‘A’ 
try : 
print ‘B’ 
a = x / y 
print ‘C’ 
except ZerorDivisionError: 
print ‘F’ 
except : 
print ‘D’ 
c) Write a class customer in python having following specifications [4] 
Instance attributes: 
customernumber - numeric value 
customername - string value 
price, qty, discount, totalprice, netprice - numeric value 
methods : 
init() to assign initial values of customernumber as 111, customername as “Leena”, qty as 0 and price, discount & netprice as 0. 
caldiscount ( ) – To calculate discount, totalprice and netprice 
totalprice = price * qty 
discount is 25% of totalprice, if totalprice >=50000 
discount 15% of totalprice, if totalprice >=25000 and totalprice <50000 
discount 10% of totalprice, if totalprice <250000
netprice= totalprice - discount 
input() – to read data members customername, customernumbar, price, qty and call caldiscount() to calculate discount, totalprice and netprice. 
show( ) – to display Customer details. 
d) What are the different ways of overriding function call in derived class of python ? Illustrate with example. [2] 
e) Write a python function to find sum of square-root of elements of a list. List is received as argument, and function returns the sum. Ensure that your function is able to handle various situations viz. list containing numbers & strings, module required is imported etc. [2] 
Q3. a) What will be the status of following list after third pass of bubble sort and third pass of selection sort used for arranging elements in ascending order? 
40, 67, -23, 11, 27, 38, -1 [3] 
b) Write a python function to search for a value in the given list using binary search method. Function should receive the list and value to be searched as argument and return 1 if the value is found 0 otherwise. [2] 
c) Define stack class in python to operate on stack of numbers. [4] 
d) Write a python function using yield statement to generate prime numbers till the value provided as parameter to it. [3] 
e) Evaluate the following postfix expression. Show the status of stack after execution of each operation separately: 
2,13, + , 5, -,6,3,/,5,*,< [2] 
Q4.a) How is method write() different from writelines() in python? [1] 
b) Given a pickled file - log.dat, containing list of strings. Write a python function that reads the file and looks for a line of the form 
Xerror: 0.2395 
whenever such line is encountered, extract the floating point value and compute the total of these error values. When you reach end of file print total number of such error lines and average of error value. [3] 
c) Given a text file car.txt containing following information of cars 
carNo, carname, milage. Write a python function to display details of all those cars whose milage is from 100 to 150. [2] 
Section C
Q5. a. Define degree and cardinality. Based upon given table write degree and cardinality. [2] 
PATIENTS 
PatNo 
PatName 
Dept 
DocID 
1 
Leena 
ENT 
100 
2 
Surpreeth 
Ortho 
200 
3 
Madhu 
ENT 
100 
4 
Neha 
ENT 
100 
5 
Deepak 
Ortho 
200 
b. Write SQL commands for the queries (i) to (iv) and output for (v) & (viii) based 
on a table COMPANY and CUSTOMER [6] 
COMPANY 
CID 
NAME 
CITY 
PRODUCTNAME 
111 
SONY 
DELHI 
TV 
222 
NOKIA 
MUMBAI 
MOBILE 
333 
ONIDA 
DELHI 
TV 
444 
SONY 
MUMBAI 
MOBILE 
555 
BLACKBERRY 
MADRAS 
MOBILE 
666 
DELL 
DELHI 
LAPTOP 
CUSTOMER 
CUSTID 
NAME 
PRICE 
QTY 
CID 
101 
Rohan Sharma 
70000 
20 
222 
102 
Deepak Kumar 
50000 
10 
666 
103 
Mohan Kumar 
30000 
5 
111 
104 
Sahil Bansal 
35000 
3 
333
105 
Neha Soni 
25000 
7 
444 
106 
Sonal Aggarwal 
20000 
5 
333 
107 
Arjun Singh 
50000 
15 
666 
(i) To display those company name which are having prize less than 30000. 
(ii) To display the name of the companies in reverse alphabetical order. 
(iii) To increase the prize by 1000 for those customer whose name starts with ‘S’ (iv) To add one more column totalprice with decimal(10,2) to the table customer 
(v) SELECT COUNT(*) ,CITY FROM COMPANY GROUP BY CITY; 
(vi) SELECT MIN(PRICE), MAX(PRICE) FROM CUSTOMER WHERE QTY>10 ; 
(vii) SELECT AVG(QTY) FROM CUSTOMER WHERE NAME LIKE “%r%; 
(viii) SELECT PRODUCTNAME,CITY, PRICE FROM COMPANY,CUSTOMER WHERE COMPANY.CID=CUSTOMER.CID AND PRODUCTNAME=”MOBILE”; 
Q6. a) State and define principle of Duality. Why is it so important in Boolean Algebra? [2] 
b) Write the equivalent boolean expression for the following logic circuit [2] 
c) Write Product Of Sum expression of the function F (a,b,c,d) from the given truth table [1] 
a 
b 
c 
d 
F 
0 
0 
0 
0 
0 
0 
0 
0 
1 
1 
1 
0 
0 
0 
0 
1 
1 
1 
1 
0 
0 
0 
0 
0 
1 
1 
0 
0 
1 
1 
0 
0 
1 
0 
1 
0 
1 
0 
1 
0 
1 
0 
1 
0 
0 
0 
1 
1 
0 
1 
1 
0 
0 
0 
1
1 
1 
1 
1 
1 
0 
1 
1 
1 
1 
1 
0 
0 
1 
1 
1 
0 
1 
0 
1 
1 
0 
0 
0 
1 
d) Obtain the minimal SOP form for the following boolean expression using K- Map. 
F(w,x,y,z) = (0,2,3,5,7,8,10,11,13,15) [3] 
Q7.a.Give any two advantage of using Optical Fibres. [1] 
b. Indian School, in Mumbai is starting up the network between its different wings. There are Four Buildings named as SENIOR, JUNIOR, ADMIN and HOSTEL as shown below.: [4] 
SENIOR 
JUNIOR 
ADMIN 
HOSTEL 
The distance between various buildings is as follows: 
ADMIN TO SENIOR 200m 
ADMIN TO JUNIOR 150m 
ADMIN TO HOSTEL 50m 
SENIOR TO JUNIOR 250m 
SENIOR TO HOSTEL 350m 
JUNIOR TO HOSTEL 350m 
Number of Computers in Each Building 
SENIOR 130 
JUNIOR 80 
ADMIN 160 
HOSTEL 50 
(b1) Suggest the cable layout of connections between the buildings. 
(b2) Suggest the most suitable place (i.e. building) to house the server of this School, provide a suitable reason.
(b3) Suggest the placement of the following devices with justification. 
· Repeater 
· Hub / Switch 
(b4) The organization also has Inquiry office in another city about 50-60 Km away in Hilly Region. Suggest the suitable transmission media to interconnect to school and Inquiry office out of the following . 
· Fiber Optic Cable 
· Microwave 
· Radio Wave 
c. Identify the Domain name and URL from the following. [1] 
http://www.income.in/home.aboutus.hml 
d. What is Web Hosting? [1] 
e. What is the difference between packet & message switching? [1] 
f. Define firewall. [1] 
g. Which protocol is used to creating a connection with a remote machine? [1]

Contenu connexe

Tendances

Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917lakshmi r
 
Computer science ms
Computer science msComputer science ms
Computer science msB Bhuvanesh
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGAmira Dolce Farhana
 
Cplus plus abd datastructure
Cplus plus abd datastructureCplus plus abd datastructure
Cplus plus abd datastructureprabhatjon
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1kvs
 
FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3Syahriha Ruslan
 
11th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 201311th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 2013Harish Gyanani
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012Syahriha Ruslan
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperDeepak Singh
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21chinthala Vijaya Kumar
 
CDAC CCAT examination important question
CDAC CCAT examination important questionCDAC CCAT examination important question
CDAC CCAT examination important questionprabhatjon
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12chinthala Vijaya Kumar
 
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...chinthala Vijaya Kumar
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013Syahriha Ruslan
 
Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guidekrtioplal
 

Tendances (20)

Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMINGFINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
FINAL PAPER FP301 OBJECT ORIENTED PROGRAMMING
 
Cplus plus abd datastructure
Cplus plus abd datastructureCplus plus abd datastructure
Cplus plus abd datastructure
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3
 
Xiicsmonth
XiicsmonthXiicsmonth
Xiicsmonth
 
11th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 201311th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 2013
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paper
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
 
CDAC CCAT examination important question
CDAC CCAT examination important questionCDAC CCAT examination important question
CDAC CCAT examination important question
 
Cs practical file
Cs practical fileCs practical file
Cs practical file
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
 
FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER
 
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
 
Qno 1 (a)
Qno 1 (a)Qno 1 (a)
Qno 1 (a)
 
Comp 328 final guide
Comp 328 final guideComp 328 final guide
Comp 328 final guide
 

Similaire à Computer Science Sample Paper 2015

CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011Deepak Singh
 
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperMalathi Senthil
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2Swarup Kumar Boro
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ reportvikram mahendra
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_papervandna123
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Deepak Singh
 
Computer Science Sample Paper 2
Computer Science Sample Paper 2Computer Science Sample Paper 2
Computer Science Sample Paper 2kvs
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answersdebarghyamukherjee60
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqpB Bhuvanesh
 
power point presentation on object oriented programming functions concepts
power point presentation on object oriented programming functions conceptspower point presentation on object oriented programming functions concepts
power point presentation on object oriented programming functions conceptsbhargavi804095
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)Make Mannan
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxSirRafiLectures
 
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docxeugeniadean34240
 

Similaire à Computer Science Sample Paper 2015 (20)

CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
 
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question Paper
 
computer science sample papers 2
computer science sample papers 2computer science sample papers 2
computer science sample papers 2
 
Ch 4
Ch 4Ch 4
Ch 4
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009Cbse question-paper-computer-science-2009
Cbse question-paper-computer-science-2009
 
C language
C languageC language
C language
 
Computer Science Sample Paper 2
Computer Science Sample Paper 2Computer Science Sample Paper 2
Computer Science Sample Paper 2
 
Class 12 computer sample paper with answers
Class 12 computer sample paper with answersClass 12 computer sample paper with answers
Class 12 computer sample paper with answers
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
C++ Functions.ppt
C++ Functions.pptC++ Functions.ppt
C++ Functions.ppt
 
power point presentation on object oriented programming functions concepts
power point presentation on object oriented programming functions conceptspower point presentation on object oriented programming functions concepts
power point presentation on object oriented programming functions concepts
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
 
Bc0037
Bc0037Bc0037
Bc0037
 
OOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptxOOP-Lecture-05 (Constructor_Destructor).pptx
OOP-Lecture-05 (Constructor_Destructor).pptx
 
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
20145-5SumII_CSC407_assign1.htmlCSC 407 Computer Systems II.docx
 
Qno 2 (c)
Qno 2 (c)Qno 2 (c)
Qno 2 (c)
 
CPP Homework Help
CPP Homework HelpCPP Homework Help
CPP Homework Help
 

Dernier

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Dernier (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Computer Science Sample Paper 2015

  • 1. CLASS-XII COMPUTER SCIENCE (Subject Code 083) SAMPLE PAPER 2014 - 15 Time allowed : 3 hours Maximum Marks: 70 Instructions: (i) All questions are compulsory. (ii) Programming Language: Section A C+ +. (iii) Programming Language : Section B Python. (iv) Answer either Section A or B, and Section C is compulsory. Section A (C++) Q1. a. Differentiate between ordinary function and member functions in C++. Explain with an example. [2] b. Write the related library function name based upon the given information in C++. (i) Get single character using keyboard. This function is available in stdio.h file. (ii) To check whether given character is alpha numeric character or not. This function is available in ctype.h file. [1] c. Rewrite the following C++ program after removing all the syntactical errors (if any), underlining each correction. : [2] include<iostream.h> #define PI=3.14 void main( ) { float r;a; cout<<’enter any radius’; cin>>r; a=PI*pow(r,2); cout<<”Area=”<<a } d. Write the output from the following C++ program code: [2] #include<iostream.h> #include<ctype.h>
  • 2. void strcon(char s[]) { for(int i=0,l=0;s[i]!='0';i++,l++); for(int j=0; j<l; j++) { if (isupper(s[j])) s[j]=tolower(s[j])+2; else if ( islower(s[j])) s[j]=toupper(s[j])-2; else s[j]='@'; } } void main() { char *c="Romeo Joliet"; strcon(c); cout<<"Text= "<<c<<endl; c=c+3; cout<<"New Text= "<<c<<endl; c=c+5-2; cout<<"last Text= "<<c } e. Find the output of the following C++ program: [3] #include<iostream.h> #include<conio.h> #include<ctype.h> class Class { int Cno,total; char section; public: Class(int no=1) { Cno=no; section='A'; total=30; } void addmission(int c=20) { section++; total+=c; } void ClassShow() { cout<<Cno<<":"<<section<<":"<<total<<endl;
  • 3. } } ; void main() { Class C1(5),C2; C1.addmission(25); C1.ClassShow(); C2.addmission(); C1.addmission(30); C2.ClassShow(); C1.ClassShow(); } f. Study the following C++ program and select the possible output(s) from it : Find the maximum and minimum value of L. [2] #include<stdlib.h> #include<iostream.h> #include<string.h> void main() { randomize(); char P[]="C++PROGRAM"; long L; for(int I=0;P[I]!='R';I++) { L=random (sizeof(L)) +5; cout<<P[L]<<"-"; } } } i) R-P-O-R- ii) P-O-R-+- iii) O-R-A-G- iv) A-G-R-M- Q2.a. How encapsulation and abstraction are implemented in C++ language? Explain with an example. [2] b. Answer the questions (i) and (ii) after going through the following C++ class: [2] class Stream { int StreamCode ; char Streamname[20];float fees; public: Stream( ) //Function 1 {
  • 4. StreamCode=1; strcpy (Streamname,"DELHI"); fees=1000; } void display(float C) //Function 2 { cout<<StreamCode<<":"<<Streamname<<":"<<fees<<endl; } ~Stream( ) //Function 3 { cout<<"End of Stream Object"<<endl; } Stream (int SC,char S[ ],float F) ; //Function 4 }; i) In Object Oriented Programming, what are Function 1 and Function 4 combined together referred as? Write the definition of function 4. ii) What is the difference between the following statements? Stream S(11,”Science”,8700); Stream S=Stream(11,”Science”,8700); c. Define a class Customer with the following specifications. [4] Private Members : Customer_no integer Customer_name char (20) Qty integer Price, TotalPrice, Discount, Netprice float Member Functions: Public members: * A constructer to assign initial values of Customer_no as 111,Customer_name as “Leena”, Quantity as 0 and Price, Discount and Netprice as 0. *Input( ) – to read data members(Customer_no, Customer_name, Quantity and Price) call Caldiscount(). * Caldiscount ( ) – To calculate Discount according to TotalPrice and NetPrice TotalPrice = Price*Qty TotalPrice >=50000 – Discount 25% of TotalPrice TotalPrice >=25000 and TotalPrice <50000 - Discount 15% of TotalPrice TotalPrice <250000 - Discount 10% of TotalPrice Netprice= TotalPrice-Discount *Show( ) – to display Customer details. d. Answer the questions (i) to (iv) based on the following code: [4] class AC {
  • 5. char Model[10]; char Date_of_purchase[10]; char Company[20]; public( ); AC( ); void entercardetail( ); void showcardetail( ); }; class Accessories : protected AC { protected: char Stabilizer[30]; char AC_cover[20]; public: float Price; Accessories( ); void enteraccessoriesdetails( ); void showaccessoriesdetails( ); }; class Dealer : public Accessories { int No_of_dealers; char dealers_name[20]; int No_of_products; public: Dealer( ); void enterdetails( ); void showdetails( ); }; (i) How many bytes will be required by an object of class Dealer and class Accessories? (ii) Which type of inheritance is illustrated in the above c++ code? Write the base class and derived class name of class Accessories. (ii) Write names of all the members which are accessible from the objects of class Dealer. (iv) Write names of all the members accessible from member functions of class Dealer. Q3a) An array T[-1..35][-2..15] is stored in the memory along the row with each element occupying 4 bytes. Find out the base address and address of element T[20][5], if an element T[2][2] is stored at the memory location 3000. Find the total number of elements stored in T and number of bytes allocated to T [3]
  • 6. b. Write a function SORTSCORE() in C++ to sort an array of structure IPL in descending order of score using selection sort . [3] Note : Assume the following definition of structure IPL. struct IPL { int Score; char Teamname[20]; }; c. Write member functions to perform POP and PUSH operations in a dynamically allocated stack containing the objects of the following structure: [4] struct Game { char Gamename[30]; int numofplayer; Game *next; }; d. Write a function in C++ to print the sum of all the non-negative elements present on both the diagonal of a two dimensional array passed as the argument to the function. [2] e. Evaluate the following postfix expression. Show the status of stack after execution of each operation separately: 2,13, + , 5, -,6,3,/,5,*,< [2] Q4. a. Write the command to place the file pointer at the 10th and 4th record starting position using seekp() or seekg() command. File object is ‘file’ and record name is ‘STUDENT’. [1] b. Write a function in C++ to count and display the no of three letter words in the file “VOWEL.TXT”. [2] Example: If the file contains: A boy is playing there. I love to eat pizza. A plane is in the sky. Then the output should be: 4 c. Given the binary file CAR.Dat, containing records of the following class CAR type: [3] class CAR { int C_No; char C_Name[20]; float Milage; public: void enter( )
  • 7. { cin>> C_No ; gets(C_Name) ; cin >> Milage; } void display( ) { cout<< C_No ; cout<<C_Name ; cout<< Milage; } int RETURN_Milage( ) { return Milage; } }; Write a function in C++, that would read contents from the file CAR.DAT and display the details of car with mileage between 100 to 150. Section B (Python) Q1.a) How is a static method different from an instance method? [2] b) Name the function / method required for [1] i) Finding second occurrence of m in madam. ii) get the position of an item in the list c) Rewrite the following python code after removing all syntax error(s). Underline the corrections done. [2] def main(): r = raw-input(‘enter any radius : ‘) a = pi * math.pow(r,2) print “ Area = “ + a d) Give the output of following with justification [2] x = 3 x+= x-x print x e) What will be printed, when following python code is executed [3] class person: def __init__(self,id): self.id = id arjun = person(150) arjun.__dict__[‘age’] = 50 print arjun.age + len(arjun.__dict__) Justify your answer.
  • 8. f) What are the possible outcome(s) expected from the following python code? Also specify maximum and minimum value, which we can have. [2] def main(): p = 'MY PROGRAM' i = 0 while p[i] != 'R': l = random.randint(0,3) + 5 print p[l],'-', i += 1 i) R - P - O - R - ii) P - O - R - Y - iii) O -R - A - G - iv) A- G - R - M - Q2. a) How data encapsulation and data abstraction are implemented in python, explain with example. [2] b) What will following python code produce, justify your answer [2] x = 5 y = 0 print ‘A’ try : print ‘B’ a = x / y print ‘C’ except ZerorDivisionError: print ‘F’ except : print ‘D’ c) Write a class customer in python having following specifications [4] Instance attributes: customernumber - numeric value customername - string value price, qty, discount, totalprice, netprice - numeric value methods : init() to assign initial values of customernumber as 111, customername as “Leena”, qty as 0 and price, discount & netprice as 0. caldiscount ( ) – To calculate discount, totalprice and netprice totalprice = price * qty discount is 25% of totalprice, if totalprice >=50000 discount 15% of totalprice, if totalprice >=25000 and totalprice <50000 discount 10% of totalprice, if totalprice <250000
  • 9. netprice= totalprice - discount input() – to read data members customername, customernumbar, price, qty and call caldiscount() to calculate discount, totalprice and netprice. show( ) – to display Customer details. d) What are the different ways of overriding function call in derived class of python ? Illustrate with example. [2] e) Write a python function to find sum of square-root of elements of a list. List is received as argument, and function returns the sum. Ensure that your function is able to handle various situations viz. list containing numbers & strings, module required is imported etc. [2] Q3. a) What will be the status of following list after third pass of bubble sort and third pass of selection sort used for arranging elements in ascending order? 40, 67, -23, 11, 27, 38, -1 [3] b) Write a python function to search for a value in the given list using binary search method. Function should receive the list and value to be searched as argument and return 1 if the value is found 0 otherwise. [2] c) Define stack class in python to operate on stack of numbers. [4] d) Write a python function using yield statement to generate prime numbers till the value provided as parameter to it. [3] e) Evaluate the following postfix expression. Show the status of stack after execution of each operation separately: 2,13, + , 5, -,6,3,/,5,*,< [2] Q4.a) How is method write() different from writelines() in python? [1] b) Given a pickled file - log.dat, containing list of strings. Write a python function that reads the file and looks for a line of the form Xerror: 0.2395 whenever such line is encountered, extract the floating point value and compute the total of these error values. When you reach end of file print total number of such error lines and average of error value. [3] c) Given a text file car.txt containing following information of cars carNo, carname, milage. Write a python function to display details of all those cars whose milage is from 100 to 150. [2] Section C
  • 10. Q5. a. Define degree and cardinality. Based upon given table write degree and cardinality. [2] PATIENTS PatNo PatName Dept DocID 1 Leena ENT 100 2 Surpreeth Ortho 200 3 Madhu ENT 100 4 Neha ENT 100 5 Deepak Ortho 200 b. Write SQL commands for the queries (i) to (iv) and output for (v) & (viii) based on a table COMPANY and CUSTOMER [6] COMPANY CID NAME CITY PRODUCTNAME 111 SONY DELHI TV 222 NOKIA MUMBAI MOBILE 333 ONIDA DELHI TV 444 SONY MUMBAI MOBILE 555 BLACKBERRY MADRAS MOBILE 666 DELL DELHI LAPTOP CUSTOMER CUSTID NAME PRICE QTY CID 101 Rohan Sharma 70000 20 222 102 Deepak Kumar 50000 10 666 103 Mohan Kumar 30000 5 111 104 Sahil Bansal 35000 3 333
  • 11. 105 Neha Soni 25000 7 444 106 Sonal Aggarwal 20000 5 333 107 Arjun Singh 50000 15 666 (i) To display those company name which are having prize less than 30000. (ii) To display the name of the companies in reverse alphabetical order. (iii) To increase the prize by 1000 for those customer whose name starts with ‘S’ (iv) To add one more column totalprice with decimal(10,2) to the table customer (v) SELECT COUNT(*) ,CITY FROM COMPANY GROUP BY CITY; (vi) SELECT MIN(PRICE), MAX(PRICE) FROM CUSTOMER WHERE QTY>10 ; (vii) SELECT AVG(QTY) FROM CUSTOMER WHERE NAME LIKE “%r%; (viii) SELECT PRODUCTNAME,CITY, PRICE FROM COMPANY,CUSTOMER WHERE COMPANY.CID=CUSTOMER.CID AND PRODUCTNAME=”MOBILE”; Q6. a) State and define principle of Duality. Why is it so important in Boolean Algebra? [2] b) Write the equivalent boolean expression for the following logic circuit [2] c) Write Product Of Sum expression of the function F (a,b,c,d) from the given truth table [1] a b c d F 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 0 1 1 0 0 0 1
  • 12. 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 1 1 0 0 0 1 d) Obtain the minimal SOP form for the following boolean expression using K- Map. F(w,x,y,z) = (0,2,3,5,7,8,10,11,13,15) [3] Q7.a.Give any two advantage of using Optical Fibres. [1] b. Indian School, in Mumbai is starting up the network between its different wings. There are Four Buildings named as SENIOR, JUNIOR, ADMIN and HOSTEL as shown below.: [4] SENIOR JUNIOR ADMIN HOSTEL The distance between various buildings is as follows: ADMIN TO SENIOR 200m ADMIN TO JUNIOR 150m ADMIN TO HOSTEL 50m SENIOR TO JUNIOR 250m SENIOR TO HOSTEL 350m JUNIOR TO HOSTEL 350m Number of Computers in Each Building SENIOR 130 JUNIOR 80 ADMIN 160 HOSTEL 50 (b1) Suggest the cable layout of connections between the buildings. (b2) Suggest the most suitable place (i.e. building) to house the server of this School, provide a suitable reason.
  • 13. (b3) Suggest the placement of the following devices with justification. · Repeater · Hub / Switch (b4) The organization also has Inquiry office in another city about 50-60 Km away in Hilly Region. Suggest the suitable transmission media to interconnect to school and Inquiry office out of the following . · Fiber Optic Cable · Microwave · Radio Wave c. Identify the Domain name and URL from the following. [1] http://www.income.in/home.aboutus.hml d. What is Web Hosting? [1] e. What is the difference between packet & message switching? [1] f. Define firewall. [1] g. Which protocol is used to creating a connection with a remote machine? [1]