0% found this document useful (0 votes)
29 views6 pages

Unsolved CTS 2024

This document is a sample unsolved theory paper for a computer science examination. It includes questions on Boolean algebra, Java programming, and logic circuit design, divided into two parts with specific instructions for answering. Candidates are required to demonstrate their understanding of various concepts through problem-solving and theoretical explanations.

Uploaded by

fuddichorraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views6 pages

Unsolved CTS 2024

This document is a sample unsolved theory paper for a computer science examination. It includes questions on Boolean algebra, Java programming, and logic circuit design, divided into two parts with specific instructions for answering. Candidates are required to demonstrate their understanding of various concepts through problem-solving and theoretical explanations.

Uploaded by

fuddichorraju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

COMPUTER SCIENCE

SAMPLE PAPER (UNSOLVED)


(THEORY)
(Candidates ore ollowed additional 15 minutes for only reading the poper.
They must NOT start writing during this time).
Answer ollquestions in Port l (compulsory) and six questions from Partll,
choosing two questions from Setion A, two from Section Band
two fromSection-C.
Allworking, incuding rough work, should be done on the sone sheet as the
The intended marks for questions or parts of questions are given in brackets [ ).

PART I(20 Marks)


Answer all questions.
While answering questions in this Part, indicate briefly your working and reasoning,
wherever required.
Question 1.
() Absorption law states that: (1)
(a) A (A'+ B) = A (5) A+(A" B) =A
(c) Both (a) and (b) (d) A"(B+C) =A "B + A"C
(ü) Assertion: A=0 B=1 C=0 and D=1 and minterm is A'"B"C'"D
Reason: The final sum term must be Oso A and C are complemented. (1]
Which one of the following options is correct?
(a) Both Assertion and Reason are true,and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.
() According to the Principle of duality, the Boolean equation (P+Q) "R"1=PaR+Q' " Rwill be equivalent to:
(a) P" Q'+R+ 1=(P+ R)" (Q'+ R) (b) P Q'+R+0= (P +R) " (Q'+R)
(c) P'Q+ R+ 1=(P'" R) " (Q+ R') (d) P" Q'+R"0= (P +R) " (Q'+ R)
(iv) The complement of the Boolean expression (X" Y' +Z' is: [1]
(a) (X + Y)"Z (b) X"YoZ
(c) (X'+ Y)" Z'(d) (X' + Y) "Z
(v) The equivalent of PA QV-pA~Q will be: E
(a) ((PAa)vP)A~Q (b) (PA Q)v( ~PA~Q)
(c) P^(QvP)A ~a (d) PA(Qv (pA ~Q)
(vi) Assertion: Boolean algebra and Binary number system are different from each other.
Reason: There are some basic operations like AND, OR and NOT which are performed only in Boolean algebra.
(a) Both Assertion and Reason are true, and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion.
(c) Assertion istrue and Reason is false.
(d) Assertion is false and Reason is true.
(1)
(vii) What is the relevarnce of the keyword static for a data member of a class
(vin) State any one purpose of using interfaces in Java programming (1)
(ix) Defne Canonical form of an expression with respect to its
Cardinal form. (1)
(x) State any one application each of half adder and full adder.
(1)

570 Touchpad Computer Science Xl


Question 2.
Convert the following infix notation to postfix form. (A/B +C)/(D(E -F) (2)
(i) An array ARR[ -4..6, -2...1.2), stores elements in Row Major Wise,with the address ARRI2]|3) as 4142. If each element
requires 2bytes of storage, find the Base address. (2)
(ii) The following functions are a part of some class:
void Try (char ch),int x)
{ System. outprintln (ch) : char temp:
if ( xcch. length/2)
tempch (x] :
ch [x) ch[ch.length-x-1);
chËch.length-x-1] = temp;
Try (ch, x+1) :

void Tryl (String n)


( char c]=new char (n. length () );
for (int i=0;i<c.length;it+)
c{i) = n.charAt (i):
Try (c,0);

(a) What willthe output of Try() when the value of chl={(P, LA, Y)and x=1?
(2]
(b) What will the output of Try1( )when the value of n="SKY"?
(1]
(iv) The following function is a part of some class which computes and returns the value of a number p'
raised to the power 'q'
(pg). There are some places in the code marked by ?1?,?2?,?3? which must be replaced by an
that the function works correctly. expression / a statement so

double power ( double p, int q)


double r = ?1? ;

int c = ( q<0 ) ? -q: q if (q == 0)


return 1 ;

else

{ for (int i = 1; i <= c ;?2?, i++) ;


return (q>0) ? r : ?3?:

}
(a) What is the expression or statement at ?1?
(b) What is the expression or statement at ?2? (1]
(c) What is the expression or statement at ?3? (1]
[1]
PART II- 50 MARKS

Answer six questions in this port, choosing two questions from Section A, two from Section Band two from SectionC.

SECTION-A
Answer any two questions.

Question 3.
() AFootballAssociation coach analyses the criteria for a win/draw of his team depending on the folowing conditions.
If the Centre and Forward players perform well but Defenders do not perform well.
OR
If Goalkeeper and Defenders perform well but the Centre players do not perform well.

OR
If all perform well.
The inputs are:

INPUTS
C Centre players perform well
D
Defenders perform well
Forward players perform well
G Goalkeeper perform well
(in all the above cases, 1 indicates yes and Oindicates no.)
Output: X- Denotes the win/draw criteria [1 indicates win/draw and Oindicates defeat in all cases]
Draw the truth table for the inputs and outputs given above and write the SOP expression for X(C, D, F, G).
(5)
(i) Reduce the above expression X(C, D, F, G) by using 4-variable Karnaugh map, showing the various groups (i.e.
pairs).
octal, quads and
Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as
inputs.
[S)
Question 4.
(i) (a) Reduce the Boolean function F(A,B,C,D) = n (0, 1, 2, 3, 4, 6, 9, 11, 13) by
using 4-variable Karnaugh map, showing the
various groups (i.e. octal, quads and pairs). |4)
(b) Draw the logic gate diagram for the reduced expression. Assume that the variables and
their complements are available
as inputs.
(1]
(üi) (a) From the logic circuit diagram given below, name the outputs (1), (2)and (3) and finally derive the
and simplify it. ldentify the propositionalconnective which is equivalent to the simplified Boolean expression (F)
Boolean expression. [4)
X

f(X,Y,Z)

D (2)

(b) If A=land B-0 then find the value of (A' + 1) " B [1]
Question5.
() Draw the logic circuit to encode the following Hexadecimal number
(1,3, 5,6,9, A, C, E) to its binary equivalents. Also state the binary equivalents of the given numbers. (5)

672 Touchpad Computer Science-XII ww


n Class The classQuestion
A 7. create check( bin num name
Class
functiondisplay()
Specify Composite(int
isComposite(int
voidfill() inp)
voidfunctions/methods: t Member m Data name
arr[]|) [Composite Specify void )void Methods
Evil( ) An 6.
class members/instance
variables:
Data Design Example: Question
Evil
members/instance Composite
variables: details acceptNum()
Composite anthe a Number (i) (i)
tothe object / class
of class Member Thus,Binary How Verify
createclass numbers A
mm, the Evil =>
to and Evil 10 is
Composite
an members contains equivalent
to a
is (B if
int fill voidfunctions: isnumber a2AC) the
object are the call
giving check an program
Each to
nn) following
those array all
rec_bin Evil 4=(A
of a details
the if This decoder
and
giving Number.a which
of
two-dimensional
the which given =>
call with functions (int 10= can
class
propositionB)
details of contains should related
all the x) number 1010 be a(B
have the
the are achieved
first constructor(),
accordingly which
functions of given more be to =>
the (m even (Flowcharts
is written 4:1 C) is
array
x ancontains valid
constructor(int, below: than n) number The by multiplexer
Evil
accordingly composite of to programs using using
two void number Answerin
order enable even of and sucha the
factors.] mnemonic
: :to
: : Composite
: : acceptNum(), : : : : : : :Evil 1's SECTION-B ?
column
towise in to to integerinteger integer [m function technique to to to
default to to ornumber Algorithms any truth
numbers task.the in must
to
int),display initialise
fillreturn x check convertaccept store store not, its
way
enable n]. two table:
the binary be names that
int to to array The constructor the a Some on
1 rec_bin() whether a written questions.
e
is thelements if th e store store in void the positive are it
the
Composite(int), maximum
column positive binary 1's .
array the to of equivalent. clearly
size the the store decimal not and
task. number rec_bin(int) the in
and the to integer comments
required.)
Java.
in of number
ofnumber wise. integer equivalent members depicts
a th e th e the values given
to number initialise
matrix
array matrix, is composite display number
composite of of number the
void possible and number
of in
form with columns rows into the
m=mm void the the the logic
fil() data
the numbers its class program. of
and otherwise for check().result is
an binary member the
first and both are
void with Evil probiem.
(m n=nn column Define equivalent given
display(). 'm' numberan
x
returns with
n) and appropriate
composite a below:
wise main() legal
'n'
Define 0 is
by using
invoking initial
value
20. function
Design message recursive
a numbers
main()
(10] the (10) (2) (3]
a to
Question 8. |10]
A
class Encode has been defined to replaceonly the vowels in aword by the next corresponding vowel and forn anew word
ie. A-E,E,|0,0>0.U>Aand a>e.ei,io,0 u, andu a
Example: Input Institution

Output Onstotatoun

Some of the members of the class are given below


Encode
Class name
Data members/instance variables:
to storea word
word
length integer to storethe length of the word
new word tostore the encoded word
Methots/Member functions:
values
Encode) default constructor to initialise data members with legal initial
voidacceptWord0 to accept a word
'word by the next
void nextVowel0 to replace only the vowels from the word stored in
corresponding vowel and to assign it to newword, with the remaining
alphabets unchanged
encrypted word
void displav() : to display the original word along with the
void nextVowel() and void display). Define amain)
Speoty the ciass Encode giving details of the constructor(), void acceptWord(),
function to createan object and call the functions accordingly to enable the task.

SECTION C
Answer any two questions.
logic of the problem stepwise.
Eoch program should be written in such a way that it clearly depicts the
mnemonic names or pseudo codes for algorithms.
This con be achieved by using comments in the program and required/specified.
written in general/standard form, wherever
The programs must be written in Java and the algorith ms must be
(Flowcharts are not required.)

Question 9
added from the rear end and
elements with the restriction that an element can be
Shelf is a kind of data structure which can store
removed from the front end only.
The detaiis of the class Shelf are given below:
: Shelf
Class name
Oata members/instance variables:
array to hold decimalnumbers
elel )
: maximum limit of the shelf
to point the index of the front end
front
:to point the index of the rear end
fear

Methods/Member functions
constructor to initialise rear-0, limn, front 0 and
Sheiffint n) possible. otherwise
void pusthValfdouble vi
:to push decimal numbers in the shelfat the rearend if
display the message "SHELE S FULL"
trom the front endot the shelt
to remove and return the decimal number
double popVall)
if any, else returns -999 99
shelt
: to display the elements of the
other functions
pushval(double) and 14}] doubie popVall ) Assume that the
void display)
details of the funtions void
( Specity the class Shelfgiving
have been defined
be written
The main )function and algoithen need NOT
() Nare the entity described above and state its principle.

674 Touchpad Computer Science X


[5)
Question 10.
rclass Circle has been defined to calculate the area of a circle. Define asubclass Volume to calculate the volume of a cylinder.
The details of the members of both the classes are given below:
Class name :Circle
Datamembers/instance variables:
radius : tostore the radius in decimals
area : to store the areaof a circle
Methods/Member functions:
values to the datamembers
Circle(...) : parameterised constructor to assign
void cal area() : calculates the area of a circle (r)
void display( ) : to display the area of the circle
Class name : Volume
Data members/instanc variables:
height : to store the height of the cylinder in decimals
volume : to store the volume of the cylinder in decimals
Methods/Menberfnions.
members of both
Volume{...) parameterised constructor to assign values to the data
the classes
the formula (r'h)
double calculate(0 tocalculate and return the volume of the cylinder using
where, r is the radius and h is the height
: to display the area of a circle and volume of a
cylinder
void display( )
Volume giving the details of the
Assume that the super class Circle has been defined. Using the concept of inheritance, specify the class
constructor(...), double calculate( ) and void display().
The super class, main function and algorithm need NOT be written.

Question 11.
(i) With the help of an example, briefly explain the constant factor in time complexity.
(2]
(üi) Answer the following questions from the diagram of a Binary Tree given below:
A

E H

(a) Name the external nodes of the right sub tree. [1]
(b) State the size and depth of the tree. (1]
(c) Write the post-order traversal of the above tree structure. [1]

www Sample Paper 675

You might also like