CLASS 12 ISC JAVA SPECIMEN PAPER 2022 Term - I

Maximum Marks: 70

Time allowed: One and a half hours

(Candidates are allowed additional 15 minutes for only reading the paper.)

ALL QUESTIONS ARE COMPULSORY

The marks intended for questions are given in brackets [ ].

Select the correct option for each of the following questions.

SECTION A




Question 1

The law which represents the Boolean equation A + B = B + A is.

  1. Associative Law
  2. Distributive Law
  3. Commutative Law
  4. Absorption Law

Solution

(c) Commutative Law


Question 2

The dual of the Boolean equation (X+Y) ·1 = X+Y is.

  1. X+Y + 0
  2. X·Y + 0 = X·Y
  3. (X·Y) + 1 = X·Y
  4. (X+Y) + 0 = X·Y

Solution

(b) X·Y + 0 = X·Y
Encapsulation


Question 3

If A=1, B=0, C=0 and D=1, then the maxterm will be.

  1. AB’C’D
  2. A’BCD’
  3. A+B’+C’+D
  4. A’+B+C+D’

Solution

(d) A’+B+C+D’


Question 4

The compliment of the Boolean expression F(P,Q,R) = (P + Q + R) is.

  1. P’Q’R’
  2. P’ + Q’ + R’
  3. P + (Q’+R’)
  4. (P+Q) + R'

Solution

(a) P’Q’R’


Question 5

The propositional operator => represents.

  1. Conjunction
  2. Implication
  3. Disjunction
  4. Negation

Solution

(b) Implication


Question 6

Encoders are used for.

  1. Adding two bits
  2. Converting Decimal to Binary
  3. Converting Binary to Decimal
  4. Data transmission

Solution

(b) Converting Decimal to Binary


Question 7

NAND gate is formed by the combinations of.

  1. AND gate and OR gate
  2. OR gate and NOT gate
  3. NAND gate and NOT gate
  4. AND gate and NOT gate

Solution

(d) AND gate and NOT gate


Question 8

The combinational circuit which adds two binary bits is.

  1. Full Adder
  2. Decoder
  3. Half Adder
  4. Multiplexer

Solution

(c) Half Adder


Question 9

The Quad group in a Karnaugh’s map eliminates.

  1. One variable
  2. Four variables
  3. Three Variables
  4. Two variables

Solution

(d) Two variables


Question 10

The proposition (a <=> b ) is represented by.

  1. a'b’ + ab
  2. (a'+b’) · (a+b)
  3. (a+b)’
  4. (a·b)’

Solution

(a) a'b’ + ab


Question 11

If the input in a decoder is A’BC’D, then the decimal equivalent output will be.

  1. 8
  2. 10
  3. 5
  4. 6

Solution

(c) 5


Question 12

A matrix MAT[10][15] is stored in the memory in Row Major Wise with each element requiring 2 bytes of storage. If the base address at MAT[1][2] is 2215, then the address of MAT[3][7] will be.

  1. 2285
  2. 2315
  3. 2319
  4. None of the above

Solution

(a)
= 2215 + 2 x (15 x (3-1) + (7-2))
= 2215 + 2 x 35
= 2215 + 70
= 2285


Question 13

With reference to the given proposition ~P => Q , answer the following questions.

  1. the converse of the proposition is.
    1. ~Q => P
    2. Q => ~P
    3. ~Q => ~P
    4. ~P => ~Q
  2. Solution

    (i) ~Q => P

  3. the contra-positive of the proposition is.
    1. ~P => Q
    2. Q => P
    3. ~Q => P
    4. ~ P => ~Q

Solution

(iii) ~Q => P


Question 14

The reduced expression for the Boolean expression F(X,Y,Z) = ∑(0,1,2,3,4,5,6,7) is.

  1. XY’ + X’Y
  2. 1
  3. 0
  4. None of the above

Solution

(b) 1


Question 15

What is the output of the code given below?
int i,j;
for( i=1; i<=5;i++);
for(j=i+1;j< 1;j++);
System.out.print(i + "+" + j) ;

  1. 67
  2. 1+2
  3. 6+7
  4. 12

Solution

(c)


Question 16

What is the output of the statement given below?
System.out.print(Integer.parseInt(“234”)+’A’);

  1. 234+65
  2. 234A
  3. 299
  4. ERROR

Solution

(c)


Question 17

What is the output of the statement given below?
System.out.print(‘A’+’1’+’C’);

  1. 65+1+66
  2. 10+1+67
  3. 181
  4. 65+49+67

Solution

(c)


Question 18

The basic logic gate that represents the simplification of the Boolean expression A.(A’+B). (A+B) is.

  1. OR gate
  2. NOT gate
  3. AND gate
  4. None of the above

Solution

(c)


Question 19

What is the conditional statement to check for the Non-boundary elements in a double dimensional array of ‘M’ number of rows and ‘N’ number of columns? The row index is represented by ‘r’ and the column index is represented by ‘c’.

  1. (r>0 || r< M-1 && c>0 || c< N-1)
  2. (r>0 && r< M-1 || c>0 && c< N-1)
  3. (r>0 && r< M-1 && c>0 && c< N-1)
  4. (r>0 || r< M-1 || c>0 || c< N-1)

Solution

(b)


Question 20

The proposition ~( a ∧ b ) V (~a => b) is a.

  1. Contradiction
  2. Contingency
  3. Tautology
  4. Implication

Solution

(c)


Question 21

Reduce the given Boolean function F(A,B,C,D) = ∑(0,2,4,8,9,10,12,13) by using 4-variable Karnaugh map and answer the following questions.

  1. What will be the least number of groups and their types formed for reduction?
    1. 6 pairs
    2. 2 quad and 2 pairs
    3. 1 quad and 3 pair
    4. 3 quads
  2. Solution

    (iv)

  3. The reduced expression of the Boolean function given above is:
    1. ACD’ + B’D’ + BD
    2. (A+C’+D’).(B’+D’).(A+C’)
    3. C’D’ + AC’ + B’D’
    4. (C+D’). (B’+D’).(A+B+D)

Solution

(iii)



Question 22

A school intends to select candidates for an Inter school competition as per the criteria given below:
  • The student has participated in an earlier competition and is very creative
  • OR

  • The student is very creative and has excellent general awareness, but has not participated in any competition earlier
  • OR

  • The student has excellent general awareness and has won prize in an inter -house competition
The inputs are:
A - Participated in a competition earlier
B - Is very creative
C - Won prize in an inter house competition
D - Has excellent general awareness

( In all the above cases 1 indicates yes and 0 indicates no).

Output: X [ 1 indicates yes and 0 indicates no for all cases].
Draw the truth table for the inputs and outputs given above and answer the following questions:

  1. The POS expression for X(A,B,C,D) will be:
    1. F(A,B,C,D) = ∑ (3, 5, 7, 11, 12, 13, 14, 15)
    2. F(A,B,C,D) = π (3, 5, 7, 11, 12, 13, 14, 15)
    3. F(A,B,C,D) = π (0, 1, 2, 4, 6, 8, 9, 10)
    4. F(A,B,C,D) = ∑ (0, 1, 2, 4, 6, 8, 9, 10)
  2. Solution

    (iii)

  3. The maximum input combinations for the above truth table will be:
    1. 24
    2. 16
    3. 8
    4. 4

Solution

(ii) As there are 4 inputs so there will be 24 = 16 input combinations.


Question 23

Reduce the given Boolean function F(A,B,C,D) = π(3,4,5, 6, 7, 11,13,15) by using 4-variable Karnaugh map and answer the following questions.

  1. What will be the least number of groups and their types formed for reduction?
    1. 6 pairs
    2. 3 quads
    3. 1 quad and 3 pairs
    4. 2 quad and 3 pairs
  2. Solution

    (ii) 3 quads

  3. The reduced expression of the Boolean function given above is:
    1. (B+C).(B+D).(A’+D)
    2. BC + BD + A’D
    3. AB’ + C’D’ + B’D’
    4. (A+B’).(C’+D’).(B’+D’)

Solution

(iv) (A+B’).(C’+D’).(B’+D’)



Question 24



From the logic diagram given above, where A,B and C are inputs and F is the output, answer the following questions:

  1. The expression at (1) is:
    1. A.B
    2. A’+B’
    3. A+B’
    4. A+B
  2. Solution

    (iv) A+B

  3. The expression at (3) is:
    1. A+B.C’
    2. ((A+B)’.C)’
    3. ((A+B).C)’
    4. (A+B).C
    5. Solution

      (iii) ((A+B).C)’

    6. The final expression F(A,B,C) is:
      1. F=((A+B)’.C)’ + (A+B)
      2. F=((A+B)’.C)’ + (A+B)
      3. F=( (A+B).C)’ + (A+B)
      4. F= (AB + C)’ +(A+B)

    Solution

    (iii) F=( (A+B).C)’ + (A+B)


Question 25

Given the Boolean expression F = ( P + R) · ( P·Q + Q·R’ ), identify:

  1. The complement of the expression:
    1. P’R’ + (P’+Q’).(Q’+R)
    2. (P’+R’) . (P’+Q’) + (Q+R’)
    3. P’R’ .(PQ’ + Q’R)
    4. (P+R)’ .(P’+Q).(Q’+R)
  2. Solution

    (i)
    Explanation:
    Applying the DeMorgan's law
    F ( P + R) ( PQ + QR. )
    = ((P+R). (P.Q + Q•R'))'
    = ((P+R)' + (P.Q +Q.R')') (De-morgan's law)
    = P'. R' + (P'+Q')(Q'+R)

  3. The law used:
    1. Distributive Law
    2. De Morgan Law
    3. Associative Law
    4. Idempotent Law

Solution

(ii)


Question 26

With reference to the program code given below, answer the questions that follow:
void fun(int n)
{ int i,f;
for( i=1,f=1;i<=n;i++,f*=i);
System.out.print(f);
}

  1. What is the output of the method fun() when the value of n=4?
    1. 24
    2. 72
    3. 120
    4. ERROR
  2. Solution

    (ii)

  3. What is the method fun() performing?
    1. Checking for Prime Numbers
    2. Product of odd numbers
    3. Factors of a number
    4. Finding the factorial

Solution

(iv)


Question 27

With reference to the program code given below, answer the questions that follow:
int test(int n)
{ if(n==1) return 0;
for (int i=2;i<=(int)(Math.sqrt(n));i++)
if( n%i==0)
return 0;
return 1;
}

  1. What will the method test() return when the value of n=9?
    1. 1
    2. true
    3. 0
    4. Error
  2. Solution

    (iii)

  3. What is the method test() performing?
    1. Prime number/Composite number
    2. Armstrong number
    3. Palindrome number
    4. Perfect number

Solution

(i)


Question 28

With reference to the program code given below, answer the questions that follow:
void dimen(int n[ ][ ])
{ int p=0;
for (int i=0;i< n.length;i++)
for(int j=0;j< n[0].length;j++)
{ if(i==0 ||i==n.length-1 || j==0 || j==n[0].length-1)
p=p+n[i][j];
}
System.out.print(p);
}

  1. What will be the output of the method dimen() when the value of n[ ][ ] ={{2,3,7},{1,5,9},{10,-3,8}} ?
    1. 42
    2. 33
    3. 5
    4. 37
  2. Solution

    (iv)

  3. What is the method dimen( ) performing?
    1. Finding the product of the boundary elements
    2. Finding the sum of the non-boundary elements
    3. Finding the sum of the boundary elements
    4. Finding the sum of the matrix elements

Solution

(iii)


Question 29

With reference to the program code given below, answer the questions that follow:
void single(int x[])
{ int w=1;
for(int y=0;y< x.length;y++)
{ if(x[y]%2==0 && x[y]>0)
w=w*x[y];
}
System.out.print(w);
}

  1. What will be the output of the method single() when the value of x[] = {10,2,9,-6,5,6} ?
    1. 120
    2. 45
    3. 720
    4. 18
  2. Solution

    (i)

  3. What is the method single( ) performing?
    1. Sum of the positive odd elements
    2. Product of the even elements
    3. Product of the positive even elements
    4. Sum of the positive even elements

Solution

(iii)


Question 30

With reference to the program code given below, answer the questions that follow:
int solve(int a, int b)
{ int i,l=0;
for(i=1;i<=a*b;i++)
{ if(i%a==0&& i%b==0)
{ l=i; break;}
}
return l;
}

  1. What will be the output of the method solve() when the value of a=8 and b=12?
    1. 4
    2. 96
    3. 0
    4. 24
  2. Solution

    (iv)

  3. What is the method solve( ) performing?
    1. HCF of ‘a’ and ‘b’
    2. Prime Factors of ‘a’ and ‘b’
    3. LCM of ‘a’ and ‘b’
    4. None of the above

Solution

(iii)


Question 31

The following program code checks if the positive integer ‘N’ is a palindrome number by returning true or false. There are some places in the code marked as ?1?, ?2?, ?3?, ?4? and ?5? which are to be replaced by a statement/expression so that the code works properly.

boolean Palindrome(int N)
{ int rev = ?1? ;
int num = N;
while (num>0)
{ int f = num/10;
int s = ?2? ;
int digit = num − ?3? ;
rev = ?4? + digit;
num /= ?5?;
}
if(rev == N)
return true;
else
return false;
}

Answer the following question:

  1. What is the statement or expression at ?1?
    1. -1
    2. 0
    3. 10
    4. 2
  2. Solution

    (ii)

  3. What is the statement or expression at ?2?
    1. s *10
    2. f /10
    3. rev
    4. f *10
  4. Solution

    (iv)

  5. What is the statement or expression at ?3?
    1. s
    2. rev
    3. f
    4. digit * 10
  6. Solution

    (i)

  7. What is the statement or expression at ?4?
    1. s * 10
    2. rev *10
    3. f
    4. rev
  8. Solution

    (ii)

  9. What is the statement or expression at ?5?
    1. 1
    2. 100
    3. 10
    4. rev

Solution

(iii)


Question 32

The following program code sorts a single dimensional array in ascending order using Insertion Sort technique. There are some places in the code marked as ?1?, ?2?, ?3?, ?4? and ?5? which are to be replaced by a statement/expression so that the code works properly.

void insertionSort(int array[])
{ int n = ?1?;
for (int j = 1; j < n; j++)
{
int key = ?2?;
int i = j-1;
while ( (i > -1) && ( array [i] > ?3? ) )
{
array [i+1] = ?4?;
i--;
}
?5? = key;
}

Answer the following question

  1. What is the statement or expression at ?1?
    1. array.length()
    2. array.length
    3. length
    4. -1
  2. Solution

    (ii)

  3. What is the statement or expression at ?2?
    1. j
    2. array[j+1]
    3. array[j]
    4. 0
  4. Solution

    (iii)

  5. What is the statement or expression at ?3?
    1. key
    2. array[j]
    3. i+1
    4. n
  6. Solution

    (i)

  7. What is the statement or expression at ?4?
    1. j+1
    2. key
    3. array[j]
    4. array[i]
  8. Solution

    (iv)

  9. What is the statement or expression at ?5?
    1. array[i+1]
    2. i+1
    3. j
    4. array[i]

Solution

(i)


Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com