Professional Documents
Culture Documents
KOLKATA
REHEARSAL EXAMINATION 2023-24
SUBJECT: Computer Science (Theory) TIme: 3 hours + 15 mins. Reading time
CLASS: XIl Full marks: 100
Candidates are allowed additional 15 minutes for only reading the paper. They must NOT
start writing during this time.)
Answer all questions in Part I (compulsory) and si questions from Part- II, choosing two
questions from Section - A, bvo from Section - Band hwo from Section -C.
All working, inciuding rough work, should be done on the same sheet as the
The intended marks for questions or parts of questions are given in brackets [].
PARTI 20 marks
Answer all questions
(Whle anSwering questions in this Part, indicate your working and reasoning briefly
whenever required.)
Question 1) (10x1=10"
The logic gate that provides high output for same inputs
a). NOT
b). X-NOR
c). AND
d). XOR
i). The canonical sum of product form of the function Y{A,B) =A+Bis
a). AB + BB + A'A
b). AB + AB' + A'B
c). AB + A'B' + A'B
d). AB' +A'B +A'B'
Find Output:
vold funlint n)
If(n> 0){
fun(n -1);
System.out.priot(n +" ");
fun(n - 1);
}
fun(3):
d) Find Output :
int fun(int n)
(Intm=1,k=n/2,d=n;
while(k>=1)
{memkd;
k-;
d--;
)
m=(n%2ee 1)(n+1/2:1;
return m;
50 MARKS
PART ! Sectlon A, two from
(Answer six questions in this part, choosing two questlons from
Section 8 and two from Section C).
SECTION-A
Answer any two questions.
Question 3)
He/she secures more than 60% in class Xll examination of a recognized board and must
be above 16 years of age at the time of taking admission.
He/she belongs to reserved category and has secured up to 60% marks in class XIl
examination of a recognized board.
or
examination of a
Candidate is a female who secures more than 60% marks in class XIl
recognized board but does not belong to reserved category.
a). Draw the truth table for the Inputs and output glven above and write the SOP
expresslon for E(M,B,C,A) (S)
b). If x: Ihave a cell phone and y: Icannot study, then find inverse and converse of the
conditional x=>y. (2]
c), Using two half adder and an OR gate construct a full adder. (3]
SECTION-B
Answer any two questions.
Each program should be written In such a way that It cearly deplcts the logic of the
problem. This can be achieved by using mnemonic narhes and comrhents in the program.
Question 6)
Design a class Nadam to check and print the type of humber. Some of the
members of the
class are given below:. (10)
Question 7) (10]
Acass SetZero contains a two-dimensional array of order (m x n]. The maximum values
possible for both "m' and 'n' is 20. Design a class SetZero to input numbers Into the array
and if an element is O, set lts entre row and column to O's.
Example: 1
m=3: n3
1 1 1
0 |0
1 1 |1 0
Example: 2
m=4 ;n=5
|02 570 0oo0
1 8 693 086 90
5 1 1 41 o
774 28 07420
The details of the members of the class are given below:
Member functions/methods:
SetZero (int mm, int nn ): to initialize the size of the matrix, m=mm and n=nn
void input() :To input and store numbers in the array
vold Set() : If an element Is 0, set ts entire row and column to 0's
void display( ) : To display the array in a matrix form
Specify the class SetZero giving detalls of the constructor (int, Int), void input(), void Set( )
and void dlsplay ). Define a main () function to create an object and call the functions
accordingly to enable the task.
SECTION-C
Answer any two questions.
Each program should be written in such a
way that it clearly depicts the logic of
problem stepwise. This can be achleved by using the
names or pseudo codes for algorithms. The comments in the program and mnemonle
programs
algorithms must be written in general /standard form, must be written in Java and the
wherever required / specified.
Qiuestion 9)
(5)
A SUperclass Employee has been defined to store the details of a
Wages to compute the annual income of the worker. The worker. Define a subclass
classes are given below: details/specifications of both the
Using the concept of inheritance, specify the class Wages glving details of constructor ().
double taxcalc() and vold display (). The maln () function need not be written.
Question 10)
Register is an entity which can holda maximum of 50 integers. Register enables the user to
add elements from the rear end and remove integers from the front end of the entity.
Define a class Register with the following details:
Member functlons
Register(int mm) : constructor to initialize max=mm, begin=0, end=0.
otherwise
void addregister(int v) :to add an element from the rear index If possible
display the message" OUT OF SIZE".
: to remove and return an element from the
front index, if
int delregister()
possible otherwise display the message " EMPTY..." and
return -99.
12) 20 30
(1j
(a) Name the internal nodes of the tree. [1
(b) State the level and the order of the node 11.
[1]
(c) Write the pre-order traversal of the above tree structure.
12-Compu MB