Class XI – Computer Science Solved Paper
PART I
Q1(i) (a+b+c')' = a'b'c
Q1(ii) Answer: (b) Both true but reason not correct explanation
Q1(iii) Contrapositive of (~p => ~q) = p => q
Q1(iv) A 4 bit encoder has 4 inputs
Truth Table (AND)
A B | A.B
0 0 | 0
0 1 | 0
1 0 | 0
1 1 | 1
Truth table: It shows all possible inputs and outputs of a logic expression.
Q2(i) Operator precedence:
++ , % , >= , &&
Q2(ii) Static vs Non Static:
Static: One copy, class level
Non Static: object level, multiple copies
Q2(iii)
someFun(24,2) → 2 2 2 3
someFun(84,2) → 2 2 3 7
Function prints prime factors.
SECTION A
Scholarship Expression:
X = AB' + A'C
Conversions:
(54)10 = 1101102
(120)10 = 11110002
(76)10 = 1148
(889)10 = 37916
SECTION B
Program 1: PrimePalinGen
Program 2: ArrayMax
Program 3: Perfect number
SECTION C
Recursive sum square:
int sumSq(int n)
{
if(n==0)
return 0;
return (n%10)*(n%10)+sumSq(n/10);
}
AC + ABC = AC (True)
Canonical SOP: sum of minterms
Canonical POS: product of maxterms