0% found this document useful (0 votes)
19 views5 pages

Sample QP ISC XII For 2024 Set 01

Uploaded by

bbstudents2018
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)
19 views5 pages

Sample QP ISC XII For 2024 Set 01

Uploaded by

bbstudents2018
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/ 5

Sample QP XII for 2024 Set 01

[Total Marks: 70] [Time: 3 hours]


---------------------------------------------------------------------------
Answer all questions. No choice is given in this exam
---------------------------------------------------------------------------
PART - I (20 marks)
Question 1:
(i) According to De Morgan’s law (a + b + c′)′ will be equal to: [1]
(a) a’ + b’ + c’ (b) a’ + b’ + c (c) a’ . b’ . c’ (d) a’ . b’ . c

(ii) The dual of (X’ + 1) . (Y’ + 0) = Y’ is: [1]


(a) X . 0 + Y . 1 = Y (b) X’ . 1 + Y’ . 0 = Y’ (c) X’ . 0 + Y’ . 1 = Y’ (d) (X’ + 0) + (Y’ + 1) = Y’

(iii) The reduced expression of the Boolean function F(P, Q) = P’ + P.Q is: [1]
(a) P′ + Q (b) P (c) P′ (d) P + Q
TM
(iv) If (~p => ~q) then its contrapositive will be:
(a) p => q (b) q => p (c) ~q => p

(v) The keyword that allows multi-level inheritance in Java programming is:
(a) implements (b) super (c) extends
(d) ~p => q

(d) this
[1]

[1]

(vi) Verify if (A + A’)’ is a Tautology, Contradiction, or a Contingency [1]

(vii) What is the worst case complexity of the following segment? [1]
for (int i = 0; i <= N ; i++) {
Sequence of statement ;
}
for (int j = 0; j <= M ; j++) {
Sequence of statement ;
O
}

(viii) State any one purpose of using the keyword ‘this’ in Java programming. [1]

(ix) Write the minterm of F(A, B, C, D) when A = 1, B = 0, C = 0 and D = 1. [1]

(x) Mention any two properties of the data members of an Interface. [1]

Question 2:
(i) Convert the following infix notation to postfix form: [2]
A+(B−C∗(D/E)∗F)

(ii) A matrix A[m][m] is stored in the memory with each element requiring 4 bytes of storage. If the base
address at A[1][1] is 1500 and the address of A[4][5] is 1608, determine the order of the matrix when it
is stored in Column Major Wise. [2]

PageNo.: 1 / 5
(iii) Define Big ‘O’ notation. State the two factors which determine the complexity of an algorithm. [2]

(iv) The following function quiz( ) is a part of some class. Assume ‘n’ is a positive integer, greater than
0. Answer the given questions along with dry run / working.
int quiz ( int n)
{
if ( n <= 1 )
return n ;
else
return (--n % 2) + quiz (n / 10) ;
}
(a) What will the function quiz( ) return when the value of n=36922? [1]

(b) State in one line what does the function quiz( ) do, apart from recursion? [1]

(v) Draw the Encoder circuit to convert A - F hexadecimal numbers to binary [2]

TM
Question 3:
PART - II (50 marks)
Section - A

(i) A training institute intends to give scholarships to its students as per the criteria given below :
• The student has an excellent academic record but is financially weak.
OR
• The student does not have an excellent academic record and belongs to a backward class.
OR
• The student does not have an excellent academic record and is physically impaired.
The inputs are:
O

(In all the above cases 1 indicates yes and 0 indicates no).
Output : X [1 indicates yes, 0 indicates no for all cases]
Draw the truth table for the inputs and outputs given above and write the SOP expression for
X(A,F,C,I). [5]

(ii) Reduce the above expression X (C, D, F, G) by using a 4-variable Karnaugh map, showing the
various groups (i.e. octal, quads and pairs).
Draw the logic gate diagram for the reduced expression. Assume that the variables and their
complements are available as inputs. [5]

PageNo.: 2 / 5
Question 4:
(i) (a) Given the Boolean function: F(A, B, C, D) = 𝝅(3,4,5,6,7,10,11,14,15).
Reduce the above expression by using a 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]

(ii) (a) Using the truth table, state whether the following proposition is a tautology, contingency or a
contradiction: [3]
~(A∧B)∨(~A⇒B)
(b) State the application of a Half Adder. Draw the circuit diagram of a Full Adder using two half
adders. [2]

TM
Question 5:
Section - B

Design a class Pronic to check if a given number is a pronic number or not. [ A number is said to be
pronic if the product of two consecutive numbers is equal to the number]
Example: 0 = 0 × 1
[10]

2=1×2
6=2×3
12 = 3 × 4
Thus, 0, 2, 6, 12... are pronic numbers.
Some of the members of the class are given below:
Class name : Pronic
O
Data members/instance variables:
nnum : to store a positive integer number

Methods / Member functions:


Pronic( ) : default constructor to initialize the data member with legal initial value
void acceptnum( ) : to accept a positive integer number
boolean ispronic(int v) : returns true if the number ‘num’ is a pronic number, otherwise returns
false using recursive technique

void check( ) : checks whether the given number is a pronic number by invoking the
function ispronic() and displays the result with an appropriate message
Specify the class Pronic giving details of the constructor( ), void acceptnum( ), boolean ispronic(int) and
void check( ). Define a main( ) function to create an object and call the functions accordingly to enable
the task.
PageNo.: 3 / 5
Question 6:
A sequence of fibonacci strings is generated as follows: [10]
S0 = ''a'' , S1 = ''b'', Sn = S(n-1) + S(n -2) where '+' denotes concatenation. Thus the sequence is:
a, b, ba, bab, babba, babbabab, . . . . . . . . . n terms.
Design a class FiboString to generate fibonacci strings. Some of the members of the class are given
below:
Class name : FiboString

Data members / Instance variables:


x : to store the first string
y : to store the second string
z : to store the concatenation of the previous two strings
n : to store the number of terms

FiboString
void accept
TM
Data fuctions / methods:
: constructor to assign x = “a” , y = “b” , z = “ba”
: to accept number of terms ‘n’
void generate() : to generate and print the fibonacci. strings. Thesum of('+' ie concatenation) first
two strings is the third string. Eg. ''a'' is first string, ''b'' is second string then the
third will be ''ba'', and fourth will be ''bah'' and so on.

Specify the class FiboString, giving details of the constructor( ), void accept( ) and void generate( ).
Define the main( ) function to create an object and call the functions accordingly to enable the task .
O
Section - C

Question 7:
Register is an entity which can hold a maximum of 100 names. The register enables the user to add
and remove names from the top most end only. Define a class Register with the following details:
Class name : Register

Data members / instance variables:


stud[ ] : array to store the names of the students
cap : stores the maximum capacity of the array
top : to point the index of the top end

Member functions:
Register (int max) : constructor to initialize the data member cap = max, top = −1 and create the
string array

PageNo.: 4 / 5
void push(String n): to add names in the register at the top location if possible, otherwise
display the message “OVERFLOW”
String pop( ) : removes and returns the names from the top most location of the register if any,
else returns “$$”
void display( ): displays all the names in the register

(a) Specify the class Register giving details of the functions void push(String) andString pop( ) .
Assume that the other functions have been defined.
The main function and algorithm need NOT be written. [4]

(b) Name the entity used in the above data structure arrangement. [1]

Question 8:
(i) Differentiate between the keywords – “extends” and “implements”. [2]
TM
(ii) Answer the following questions from the diagram of a Binary Tree given below:

(a) Write the inorder traversal of the above tree structure. [1]

(b) State the height of the tree, if the root is at level 0 (zero). [1]

(c) List the leaf nodes of the tree. [1]


O

PageNo.: 5 / 5

You might also like