CBSE Model Question Paper of Computer Science

Mar 2 • Board Sample Papers • 5350 Views • 21 Comments on CBSE Model Question Paper of Computer Science

Central Board of Secondary Education(CBSE) is a Educational Board for both public and private schools, run under the Union of Government of India. CBSE Board is a self financing body year conducts final exams for class tenth and twelfth as  All India Senior School Certificate Examination (AISSCE).Every year Board publish three CBSE model question paper for every subjects that comes in Board Exams for practice.The following paper is designed to provide a platform through which students are able to improve their exam preparation to perform well in the exams.

CBSE Model Question Paper of Computer Science is given below:

CBSE Computer Science Model Question Paper-

CBSE Model Question Papers

General Instructions to be followed:
(a) This paper consists of total 7 questions.
(b) All questions are compulsory.
(c)Marks are allotted to each question for your convenience.

Section-A

1. (a) What is the difference between automatic type conversion and type casting?
Also, give a suitable C++ code to illustrate both.  (2)                     

2. (b) Which C++ header file(s) will be essentially required to be included to run/

execute the following C++ code? 1
void main( )
{
int Eno=123, char Ename[ ]=”Rehan Swamp”;
cout<<setw(5)<<Eno<<setw(25)<<EName<<endl;
}

(c) Rewrite the following c++ program code after removing the syntax error(s)
(if any). Underline each correction.                                          (2)
include
class TRAIN
{
long TrainNo;
char Description[25];
public:
void Entry ( )
{
cin >>TrainNo; gets(Description);
}
Void Display ( )
{
cout<<TrainNo<<“:”<<Description<<endl;
}
};
void main( )
{
TRAIN T;
Entry. T( ); Display. T( );
}

(d) Find the output of the following program : (3)
#include
struct POINT
{int X, Y, Z;};
void StepIn(POINT & P, int Step=1)
{
P.X+=Step;
P.Y -=Step;
P.Z+=Step;
}
void StepOut(POINT & P, int Step=1)
{
P.X-=Step;
P.Y+=Step;
P.Z–=Step;
}
void main ( )
{
POINT P1={15, 25, 5}, P2={10, 30, 20};
StepIn(P1);
StepOut(P2,4);
cout<<P1.X<<“,”<<P1.Y<<“,”<<P1.Z<<endl;
cout<<P2.X<<“,”<<P2.Y<<“,”<<P2.Z<<endl;
StepIn(P2,12);
cout<<P2.X<<“,”<<P2.Y<<“,”<<P2.Z<<endl;
}

(e) Find the output of the following program :                       (2)
#include
void ChangeIt(char Text[ ], char C)
{
for (int K=0;Text[K]!=”;K++)
{
if (Text[K]>=’F’ && Text[K]<=’L’)
Text[K]=tolower(Text[K]);
else if (Text[K]=’E’ || Text[K]==’e’)
Text[K]= =C;
else if (K%2==O)
Text[K]=toupper(Text[K]);
else
Text[K]=Text[K-l];
}
}
void main ( )
{
char OldText[ ]=”pOwERALone”;
ChangeIt(OldText,’%’);
cout<<“New TEXT:”<<OldText<<endl;
}

(f) The following code is from a game, which generates a set of 4 random numbers.
Yallav is playing this game, help him to identify the correct option(s) out of the
four choices given below as the possible set of such numbers generated from
the program code so that he wins the game. Justify your answer. (2)
#include
#include
const int LOW=15;
void main ( )
{
randomize( ) ;
int POINT=5, Number;
for (int 1=1;I<=4;I++)
{
Number=LOW+random(POINT) ;
cout<<Number<<“:” ;
POINT–;
}
}
(i) 19:16:15:18:
(ii) 14:18:15:16:
(iii) 19:16:14:18:
(iv) 19:16:15:16:

2. (a) What do you understand by Polymorphism.? Also, give an example in C++
to illustrate the same.                        (2)
(b) Answer the questions (i) and (ii) after going through the following class:      (2)
class TEST
{
int Regno, Max, Min, Score;
public:
TEST() //Function 1
{
Regno= 101;Max=100;Min=40;Score=75;
}
TEST(int Pregno,int Pscore) //Function 2
{
Regno=Pregno;Max=100;Min=40;Score=Pscore;
}
~TEST() //Function 3
{
cout<<“TEST Over”<<endl;
}
void Display() //Function 4
{
cout<<Regno<<“:”<<Max<<“:”<<Min<<endl;
cout<<“[Score]”<<Score<<endl;
}
};

(i) As per Object Oriented Programming, which. concept is illustrated by
Function 1 and Function 2 together?

(ii) What is Function 3 specifically referred as ? When do you think, Function 3
will be invoked/called?

(c) Define a class ITEM in C++ with following description:      (4)
Private Members
 Code of type integer (Item Code)
 Iname of type string (Item Name)
 Price of type float (Price of each item)
 Qty of type integer (Quantity of item in stock)
 Offer of type float (Offer percentage on the item)
 A member function GetOffer() to calculate Offer percentage as per the
following rule:
If Qty<=50 Offer is 0
If 50<Qty100 Offer is 10
Public Members
 A function GetStock() to allow user to enter values for Code, Iname,
Price, Qty and call function GetOffer() to calculate the offer
 A function ShowItem() to allow user to view the content of all the data
members

(d) Answer the questions (i) to (iv) based on the following:     (4)
class Chairperson
{
long CID; //Chairperson Identification Number
char CName[20];
protected:
char Description [40];
void Allocate();
public:
Chairperson();
void Assign();
void Show();
};
class Director
{
int DID; //Director ID
char Dname[20];
protected:
char Profile[30];
public:
Director();
void Input();
void output();
};
class Company: private Chairperson, public Director
{
int CID; //Company ID
char City[20], Country[20];
public:
Company();
void Enter();
void Display();
};

(i) Which type of inheritance out of the following is specifically is illustrated in
the above C++ code?
(a) Single Level Inheritance
(b) Multi Level Inheritance
(c) Multiple Inheritance

(ii) Write the names of data members, which are accessible by objects of class
type Company.

(iii) Write the names of all member functions, which are accessible by objects of
class type Company.

(iv) Write the names of all members, which are accessible from member functions
of class Director.

Section-B

3. (a) Write a function CHANGEO in C++, which accepts an array of integer and
its size as parameters and divide all those array elements by 7 which are
divisible by 7 and multiply other-array elements by 3.            (3)
Sample Input Data of the array

<td>A[2]A[3]A[4]<td>354218

A[0]A[1]
2112

Content of the array after Calling CHANGE() function

<td>A[2]A[3]A[4]<td>5654

A[0]A[1]
336

(b) An array P[50][60] is stored in the memory along the column with each of the
element occupying 2 bytes, find out the memory location for the element P[10]
[20], if the Base Address of the array is 6800.                         (3)

(c) Write a complete program in c++ to implement a dynamically allocated Stack
containing names of Countries.                                                (4)

(d) Write a function int SKIPSUM(int A[ ] [3], int N,int M) in C++ to find and
return the sum of elements from all alternate elements of a two-dimensional
array starting from A[0][0].                                                         (2)
Hint:
If the following is the content of the array

A[0][0]A[0][1]A[0][2]
451
A[1][0]A[1][1]A[1][2]
287
A[2][0]A[2][1]A[2][2]
963

The function SKIPSUM() should add elements A[0][0], A[0][2], A[1][l],
A[2][0] and A[2][2].

(e) Evaluate the following postfix notation of expression: (2)
(Show status of Stack after each operation)
False, True, NOT, OR, True, False, AND, OR

4. (a) Observe the program segment given below carefully and fill the blanks marked
as Statement 1 and Statement 2 using tellg() and seekp() functions for
performing the required task.                                            (1)
#include
class Client
{
long Cno; char Name[20], Email[30] ;
public:
//Function to allow user to enter the Cno, Name,Email
void Enter() ;
//Function to allow user to enter (modify) Email
void Modify() ;
long ReturnCno() {return Cno;}
};
void ChangeEmail()
{ Client C;
fstream F;
F.open (“INFO.DAT”,ios::binary|ios::in|ios::out);
long Cnoc;//Client’s no. whose Email needs to be changed
cin>>Cnoc;
while (F.read((char*)&C, sizeof(C)))
{
if (Cnoc= =C.ReturnCno())
{
C.Modify();
//Statement 1
int Pos = __________//To find the current
position of file pointer
// Statement 2
_______________//To move the file
pointer to write the
//modified record
back onto the file
//for the desired Cnoc
F.write((char*)&C, sizeof(C));
}
}
F.close();
}

(b) Write a function in C++ to count the words “this” and “these” present in a
text file “ARTICLE.TXT”.                                                       (2)
[Note that the words “this” and “these” are complete words]

(c) Write a function in C++ to search and display details of all flights, whose
destination is “Mumbai” from a binary file “FLIGHT.DAT”. Assuming the
binary file is containing the objects of the following class.   (3)

class FLIGHT
{
int Fno; //Flight Number
char From[20]; //Flight Starting Point
char To[20]; //Flight Destination
public:
char* GetFrom() {return From;}
char* GetTo() {return To;}
void Enter() {cin>>Fno;gets(From);gets(To);}
void Display(){cout<<Fno<<“:”<<From<<“:”<<To<<endl;}
};

5. (a) What do you understand by Candidate Keys in a table? Give a suitable
example of Candidate Keys from a table containing some meaningful data.   (2)

(b) Consider the following tables STORE and SUPPLIERS
and answer (bl) and (b2) parts of this question:
Table: STORE

Item noItemScodeQTYRateLast Buy
2005Sharpner classic2360831-jun-09
2003Ball Pen 0.252250831-jun-09
2002Gel pen preminum21150831-jun-09
2006gel pen classic21250831-jun-09
2001Eraser samll22220831-jun-09
2004Eraser Big22110831-jun-09
2009Ball Pen 0.521180831-jun-09

Table: SUPPLIERS

table

table

(b1) Write SQL commands for the following statements:        (4)
(i) To display details of all the items in the Store table in ascending order of
LastBuy.
(ii) To display ItemNo and Item name of those items from Store table
whose Rate is more than 15 Rupees.
(iii) To display the details of those items whose Supplier code (Scode) is
22 or Quantity in Store (Qty) is more than 110 from the table Store.
(iv) To display Minimum Rate of items for each Supplier individually as per
Scode from the table Store.

(b2) Give the output of the following SQL queries:                (2)
(i) SELECT COUNT(DISTINCT Scode) FROM Store;
(ii) SELECT Rate*Qty FROM Store WHERE ItemNo=2004;
(iii) SELECT Item,Sname FROM Store S, Suppliers P
WHERE S.Scode=P.Scode AND ItemNo=2006;
(iv) SELECT MAX(LastBuy) FROM Store;

6. (a) Verify the following algebraically.                                   (2)
(A’+B’).(A +B)=A’.B+A.B’

(b) Write the equivalent Boolean Expression for the following Logic circuit:        (2)

gate

gate

(c) Write the POS form of a Boolean function H, which is represented in a truth
table as follows:

Truth Table

Truth Table

(d) Reduce the following Boolean Expression using K-Map :           (3)
F (U, V, W, Z) = Σ (3, 5, 7, 10, 11, 13, 15)

7. (a) What was the role of ARPANET in the Computer Network?     (1)
(b) Which of the following is not an unit for data transfer rate?         (1)
(i) bps
(ii) abps
(iii) gbps
(iv) kbps

(c) What is the difference between Trojan Horse and Virus in terms of computers?      (1)

(d) What term we use for a software/hardware device, which is used to block,
unauthorized access while permitting authorized communications. This term is
also used for a device or set of devices configured to permit, deny, encrypt,
decrypt, or proxy all (in and out) computer traffic between different security
domains based upon a set of rules and other criteria.                                                     (1)

(e) “Learn Together” is an educational NGO. It is setting up its new campus at
Jabalpur for its webbased activities. The campus has 4 compounds as shown
in the diagram below: 4

Center to center distances between various Compounds as per architectural
drawings (in Metre) is as follows :

Details-1

Details-1

Expected Number of Computers in each Compound is as follows :

Details-2

Details-2

(e1) Suggest a cable layout of connections between the compounds.
(e2) Suggest the most suitable place (i.e. compound) to house the server
for this NGO. Also, provide a suitable reason for your suggestion.
(e3) Suggest the placement of the following devices with justification :
(i) Repeater
(ii) Hub/Switch

(e4) The NGO is planning to connect its International office situated in
Mumbai, which out of the following wired communication link, you will
suggest for a very high speed connectivity?
(i) Telephone Analog Line
(ii) Optical Fiber
(iii) Ethernet Cable

(f) Write the full forms of the following:                                    (1)
(f1) GNU
(f2) XML

(g) Write one advantage of each for Open Source Software and Proprietary
Software.                                                                                    (1)

I have prepared this Sample Paper for Computer Science students by concerning some syllabus related books. If any suggestion regarding to this paper, about the content please make suggestion in commenting section.

Click following to download more CBSE Model Question Paper for computer Science in Pdf.

CBSE Computer Science Question Paper- 1 and Answers
CBSE Computer Science Question Paper-2 and Answers 

For CBSE model question paper of Computer Science please follow links below:

1) Model Question Paper of Computer Science -1
2) Model Question Paper of Computer Science-2
3) Model Question Paper of Computer Science-3

Tell us Your Queries, Suggestions and Feedback

Your email address will not be published.

21 Responses to CBSE Model Question Paper of Computer Science

  1. ujjaini mitra says:

    (b) Answer the questions (i) and (ii) after going through the following class :
    2
    class TEST
    {
    int Regno, Max, Min, Score ;
    public :
    TEST( ) //Function 1
    4 http://www.cppforschool.com
    {
    Regno = 101 ; Max=100; Min = 40 ; score = 75 ;
    }
    TEST(int Pregno, int Pscore) //Function 2
    {
    Regno = Pregno ; Max = 100 ; Min = 40 ; Score = Pscore ;
    }
    ~TEST( ) //Function 3
    {
    cout << “TEST Over” << endl ; } void Display( ) //Function 4 { cout << Regno << “:” <

« »