Board Paper Pattern
Board Paper Pattern
(b) Data items are divided into sub item is called as ________.
(i) Group Item (ii) Elementary Item (iii) Nodes (iv) Arrays
Ans. (i) Group Item
Topic:Data Structures__ Sub-topic:Group item_XII–HSC Board Exam __Computer Science-I
1 1
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(b)In these systems, files are stored on to reels of physical tapes. Generally one or more files
are stored on to one tape.
(c) Tapes are used for transport of data from one computer to another.
Disk based systems:- It is direct access through physical address.
(a) Each disk is divided into tracks and each track is further divided into number of sectors.
(b)Number of tracks and size of sectors is variable. It varies from one drive to another.
(c) A disk has a device directory, indicating, which files are on the disk. The directory lists the
file name, starting address, file length, type of file, time of creation, and time of last update
etc.
Topic:Data Structures__ Sub-topic:File system_XII–HSC Board Exam __Computer Science-I
2 2
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(b) Explain <OL> and <UL> tag used in HTML with example.
Ans. HTML supports ordered, unordered and definition lists.
Different List Tags are:
<OL> Defines an ordered list
<UL> Defines An Unordered List
<LI> Defines a list item
<DL> Defines a definition list
<DT> Defines a definition term
<DD> Defines a definition description
Unordered Lists
An unordered list is a list of items. The list items are marked with bullets (typically small black circles).
To make an unnumbered, bulleted list,
1. Start with an opening list <UL> (for unnumbered list) tag Enter the <LI> (list item) tag followed by
the individual item; no closing </LI> tag is needed
2. End the entire list with a closing list </UL> tag
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
e.g. <HTML>
<BODY>
<H4>This is Unordered List</H4>
<UL type = “circle”>
<LI>Sunday</LI>
<LI>Monday</LI>
<LI>Tuesday</LI>
</UL>
</BODY>
</HTML>
3 3
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc. You can specify style
of numbering for the list items by giving type attribute in <OL> tag and it can take values “I” for uppercase
roman, “i” for lower case roman, “A” for uppercase letters, “a” for lower case alpha numeric letter.
The start attribute in <OL> tag is used to start the list from the required number. e.g. <OL start = “6”>
will start the list items from number 6.
e.g. <HTML>
<BODY>
<H4><B>This is an Ordered List</B></H4>
<OL type = “i”>
<LI>Sunday</LI>
<LI>Monday</LI>
<LI>Tuesday</LI>
</OL>
</BODY>
</HTML>
so output given by browser is:
This is an Ordered List:
i) Sunday
ii) Monday
iii) Tuesday
Topic:HTML__ Sub-topic:List_XII–HSC Board Exam __Computer Science-I
4 4
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(c) Explain how member functions of class can be defined outside the class definition and inside class definition
with example in C+ +.
Ans. Member functions of class can be defined at two places
(i) Outside the class definition. (ii) Inside the class definition.
Irrespective of the place of definition, the function performs same operation. Hence, code for the
function body is idential in both the cases. Only function header is changed.
(i) Outside the class definition
(a) The general form of member function definition outside the class definition is
(b) The member function incorporates an identity label or membership label (i.e., class-name : :).
(c) This label tells compiler the class to which the function belongs and restricts the scope of that
function the objects of the class ‘class-name’ specified in header line.
e.g., //class definition
class try 1
{
public:
void display (void);
};
//member function definition outside class
void try 1 : : display (void)
{
cout<<“Programming is func”;
}
(ii) Inside the class definition
(a) Another method for defining a member function is to replace the function declaration by the
actual function definition.
e.g.
class try 1
{
public:
void display (void)
{ }
};
(b) When a function is defined inside a class, it is treated as an inline function. Normally, only small
functions are defined inside the class definition.
Topic:C++ programming__ Sub-topic:Methods_XII–HSC Board Exam __Computer Science-I
5 5
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
6 6
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
7 7
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
In non-linear data structures, the linear order cannot be maintained between data elements. Generally
data elements have hierachical relationship between them. e.g. trees.
Computer language provides different data structures like arrays, stack, queue, tree etc.
Topic:Data Structures__ Sub-topic:Types_XII–HSC Board Exam __Computer Science-I
8 8
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
9 9
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(c) What is Binary Tree ? With suitable example show the relationship between Total Number of Nodes and
Depth of Binary Tree.
Ans. Binary Tree:-A binary tree is defined as a set of finite set of elements called nodes such that
a. Tree is empty
b. Tree contains a root node and remaining nodes of tree form an ordered pair of disjoint binary trees
(left and right).
Each node in a tree is assigned a level number. Generally the level number of root R of the tree is
zero and every other node is assigned to level number which is one more than the level number of its
parent. It is the distance from the root.
Level 0
B C Level 1
D E F Level 2
G H I Level 3
K M Level 4
Depth of a binary tree:-Depth of a binary tree is defined as maximum level of any nodes in the tree.
The depth of binary tree is equal to 1+ largest level number.
The maximum number of nodes of a symmetric binary tree with depth n are 2n-1.
E.g. The depth of above binary tree =1+largest level number =1+4=5
Maximum number of nodes=25-1=32-1=31.
(In above diagram all the nodes are not shown.)
Topic:Data Structure__ Sub-topic:Tree_XII–HSC Board Exam __Computer Science-I
1 01 0
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
Following figure shows representation of above record using parallel linear arrays.
First name Last name Sex City Pincode Phone No.
Record [1]
Record [2]
The records are stored in memory using parallel linear arrays, such that for an index K of all
records, First name [K], Last name [K], Sex [K], .... belong to the same record in a file.
(i.e. Kth record in the file)
Topic:Data Structure__ Sub-topic:Array_XII–HSC Board Exam __Computer Science-I
(b) Explain following terms in case of Process Scheduling :
(i) Turn-around Time
(ii) Waiting Time
(iii) Terminal Response Time
(iv) Event Response Time
Ans. (i) Turnaround time : Turnaround time is the elapsed time between the time a program or a job is
submitted and the time when it is job completed.
(ii) Waiting time : It is the time job spends in waiting queue before execution.
(iii) Terminal Response time : In the time -sharing system, Terminal response time is the time to
respond with an answer or result to a question and it depends on degree of multiprogramming, the
efficiency of hardware with OS and policy of OS to allocate resources.
(iv) Event Response time: In the real - time system , event response time is the time to respond with
an event.
Topic:Operating systems__ Sub-topic:Scheduling_XII–HSC Board Exam __Computer Science-I
1 11 1
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(b) Write a program in C++ using OOP technique to compute cirumference of circle.
Ans. #include <iostream.h>
class circle
{
public : float r, c ;
public : void accept ( )
{
cout << “Enter radius” ;
cin >> r ;
}
void compute ( )
{
c = 2 * 3.14 * r;
}
void print ( )
{
cout << “circumference is : ” << c;
}
};
void main ( )
{
circle obj;
obj . accept ( );
obj . compute ( );
obj . print ( );
getch ( );
}
Topic:C++ programming__ Sub-topic:Programs_XII–HSC Board Exam __Computer Science-I
1 21 2
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
</CAPTION>
<TR>
<TH> COUNTRY </TH>
<TH> PLAYED </TH>
<TH> WON </TH>
<TH> LOSE </TH>
</TR>
<TR>
<TD> INDIA </TD>
<TD> 30 </TD>
<TD> 27 </TD>
<TD> 03 </TD>
</TR>
<TR>
<TD> PAKISTAN </TD>
<TD> 30 </TD>
<TD> 03 </TD>
<TD> 27 </TD>
</TR>
</TABLE>
</BODY>
</HTML>
Topic:HTML__ Sub-topic:Programs_XII–HSC Board Exam __Computer Science-I
OR
5. Solve any two of the following :
(a) Write a C++ program to find the smallest off four given integers using function min( ) that returns the
smallest of four given integers. The function prototype is as below int min (int, int, int, int).
Ans. # include <iostream.h>
# include <conio.h>
int min(int, int, int, int);
void main ( )
{
int w, x, y, z;
cout <<“Enter four integers”;
cin >> w >> x >> y >> z;
cout <<“The minimum no’ = <<min (w, x, y, z) << endl;
}
int min(int n1, int n2, int n3, int n4)
{
int min = n1;
if (n2 < min) min = n2;
1 31 3
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
(b) Write an object oriented program in C++ to read an integer number and find the sum of digits of integer
[Hint : input 125 output 8 i.e. 1 + 2 + 5 = 8]
Ans. # include <iostream.h>
class digit
{
private :
int num ;
public :
void getdata ( ) ;
void sum ( ) ;
};
void digit : : getdata ( )
{
cout << “Enter the number” ;
cin >> num ;
}
void digit : : sum ( )
{
int rem, add = 0;
while (num > 0)
{
rem = num % 10;
add = add + rem;
num = num /10;
}
cout << “The sum of all digit of number = “<< add ;
}
void main ( )
{
digit S ;
S.getdata ( ) ;
S. sum ( ) ;
}
Topic:C++ programming__ Sub-topic:Programs_XII–HSC Board Exam __Computer Science-I
1 41 4
Rao IIT Academy/ XII HSC Board Exam Computer Science Paper-I (D-9) / QP+Solutions
1 51 5