Trending ▼   ResFinder  

ISC Class XII Prelims 2025 : Computer Science (Krishnagar Academy, Nadia)

6 pages, 59 questions, 0 questions with responses, 0 total responses,    0    0
iamtanmoy
Krishnagar Academy, Nadia
+Fave Message
 Home > iamtanmoy >   F Also featured on: School Page

Formatting page ...

KRISHNAGAR ACADEMY Pre-Board Examination 2024-2025 Class-XII Subject- Computer Science F.M.-70 Time allowed: 3 hours Answers to this Paper must be written on the paper provided separately. The time given at the head of this Paper is the time allowed for writing the answers. The intended marks for questions are given in brackets [ ]. QUESTION 1 (i) Distributive law states that: [1] (a) A ( A + B) = A (b) A + ( A B) = A (c) Both (a) and (b) (d) A ( B + C ) = A B + A C (ii) Assertion : A=1 B=0 C=0 and D=0 and minterm is A B C D Reason : The final sum term must be 0 so B, C and D are complemented. [1] Which one of the following options is correct? (a) Both Assertion and Reason are true, and Reason is the correct explanation 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. (iii) According to the Principle of duality, the Boolean equation (P + Q ) R 1 = P R + Q R will be equivalent to: [1] (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 Y Z (c) (X + Y ) Z (d) (X + Y ) Z (v) The equivalent of P Q ~ P ~ Q will be: [1] (a) ((P Q ) ~ P ) ~ Q (b) ( P Q) (~ P ~ Q) (c) P (Q ~ P) ~ Q (d) P ( Q (~ P ~ 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. [1] (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. (vii) What is the relevance of the keyword new for a data member of a class. [1] (viii) State any one purpose of using constructors in Java programming. [1] (ix) (x) Define Canonical form of an expression with respect to its Cardinal form. [1] State any one application of full adder. [1] QUESTION 2 (i) Write Cardinal form for the given expression f(a,b,c) = a b c + abc + ab c + a bc (ii) An array ARR[ 4 ..6, 2 ..12] stores elements in Row Major Wise, with address ARR[2][3] as 4142. If each element requires 2 bytes of storage, find Base address. (iii) The following functions are a part of some class: void Try(char ch[],int x) { System.out.println(ch); char temp; if(x<ch.length/2) {temp=ch[x]; ch[x]= ch[ch.length x-1]; ch[ch.length x-1] = temp; Try(ch,x+1); } } [2] the the [2] void Try1(String n) { char c[]=new char[n.length()]; for(int i=0;i<c.length;i++) c[i] = n.charAt(i); Try(c,0); } (a) What will the output of Try( ) when the value of ch[]={ S , K , I , P } and x=1? [2] (b) What will the output of Try1( ) when the value of n= PLY ? [1] (iv) The following function is a part of some class which computes and returns the value of a number p raise to the power q (pq). There are some places in the code marked by ?1?, ?2? , ?3? which must be replaced by an expression / a statement so that the function works correctly. double power (double p, int q) { double r = ?1? ; int c = ( q<0 ) ? -q : q; f ( 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? (c) What is the expression or statement at ?3? [1] [1] [1] PART - II (50 MARKS) Answer SIX questions in this part, choosing TWO questions from Section A, TWO from Section B and TWO from Section C. SECTION A Answer any two questions. QUESTION 3 A training institute intends to give scholarships to its students as per the criteria given below: A student has an excellent academic record but is financially weak. OR A student does not have an excellent academic record but belongs to a backward class. OR A student does not have an excellent academic record and is physically impaired. The inputs are: INPUTS: A Has an excellent academic record F B Financially sound Belongs to Backward class P Is physically impaired (In all the above cases 1 indicates yes and 0 indicates no.) OUTPUT: X [1 indicates high power, 0 indicates low power for all cases] (i) Draw the truth table for the inputs and outputs given above. (ii) Write the SOP expression for X(A, F, B, P). (iii) Reduce the expression using K-Map and write simplified expression. (iv) Draw the logic circuit diagram for reduced expression. QUESTION 4 (i) (ii) [2] [2] [4] [2] (a) Reduce the Boolean function F(A,B,C,D) = (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] (a) From the logic circuit diagram given below, name the outputs (1), (2) and (3) and finally derive the Boolean expression (F) and simplify it. Identify the propositional connective which is equivalent to the simplified Boolean expression. [4] (b) If A=1 and B=0 then find the value of (A + 1) B [1] QUESTION 5 (i) 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] (ii) Verify if the following proposition is valid using the truth table: A => (B ^ C) = (A => B ) ^ ( B => C ) (iii) [3] How is a 2 to 4 decoder related to 4:1 multiplexer? Explain and draw the logic circuit of 4:1 multiplexer. [2] SECTION B Answer any two questions. Each program should be written in such a way that it clearly depicts the logic of the problem. This can be achieved by using mnemonic names and comments in the program. (Flowcharts and Algorithms are not required.) The programs must be written in Java. QUESTION 6 [10] An Evil Number is a number which contains even the number of 1 s in its binary equivalent. Example: Binary equivalent of 10)10 = 1010)2 which contains even number on 1 s. Thus, 10 is an Evil Number. Design a class Evil to check if the given number is an Evil number or not. Some of the members of the class are given below: Class name: Evil Data members/instance variables: num: to store a positive integer number. bin : to store the binary equivalent. Methods/Member functions: Evil( ) : default constructor to initialize the data member with legal initial value void acceptNum( ) : to accept a positive integer number void rec_bin (int x) : to convert the decimal number into its binary equivalent using recursive technique void check( ) : to check whether the given number is an Evil number by invoking the function rec_bin() and to display the result with an appropriate message Specify the class Evil giving details of the constructor(), void acceptNum( ), void rec_bin(int) and void check( ). Define a main() function to create an object and call all the functions accordingly to enable the task. QUESTION 7 [10] A class Composite contains a two-dimensional array of order [m x n]. The maximum possible value for both m and n is 20. Design a class Composite to fill the array with the first (m x n) composite numbers in column wise. [HINT: Composite numbers are those which have more than two factors.] The details of the members of the class are given below: Class name: Composite Data members/instance variables: arr[ ] [ ] : integer array to store the composite numbers column wise m : integer to store the number of rows n : integer to store the number of columns Member functions/methods: Composite(int mm, int nn ) : to initialize the size of the matrix, m=mm and n=nn int isComposite( int p ): to return 1 if the number is composite otherwise returns 0 void fill ( ) : to fill the elements of the array with the first( m n) composite numbers in column wise void display( ): to display the array in a matrix form. Specify the class Composite giving details of the constructor(int,int), int isComposite(int), void fill( ) and void display( ). Define a main( ) function to create an object and call all the functions accordingly to enable the task. QUESTION 8 [10] A class Encode has been defined to replace only the vowels in a word by the next corresponding vowel and form a new word. i.e. A -> E, E -> I, I -> O, O -> U, U -> A and a -> e, e -> i , i -> o, o -> u, and u -> a Example: Input : Institution Output : Onstotatoun Some of the members of the class are given below: Class name : Encode Data members/instance variables: word : to store a word length : integer to store the length of the word new_word : to store the encoded word Methods / Member functions: Encode( ) : default constructor to initialize data members with legal initial values void acceptWord( ) : to accept a word void nextVowel( ) : to replace only the vowels from the word stored in word by the next corresponding vowel and to assign it to new word , with the remaining alphabets unchanged void display( ) : to display the original word along with the encrypted word Specify the class Encode giving details of the constructor( ), void acceptWord( ), void nextVowel( ) and void display( ). Define a main ( ) function to create an object and call the functions accordingly to enable the task. SECTION - C Answer any two questions. QUESTION 9 Holder is a kind of data structure which can store elements with the restriction that an element can be added from the rear end and removed from the front end only. The details of the class Holder is given below: Class name: Holder Data members/instance variables: Q[ ]:array to hold integers cap: maximum capacity of the holder front: to point the index of the front end rear: to point the index of the rear end Methods / Member functions: Holder(int n ): constructor to initialize cap=n, front= 0 and rear=0 void addint( int v ): to add integers in the holder at the rear end if possible, otherwise display the message HOLDER IS FULL int removeint( ): removes and returns the integers from the front end of the holder if any, else returns 999 void show( ): displays the elements of the holder (i) Specify the class Holder giving details of the functions void addint(int) and int removeint( ). Assume that the other functions have been defined. The main( ) function and algorithm need NOT be written. [4] (ii) Name the entity described above and state its principle. [1] QUESTION 10 [5] Write a program to accept a number from the user and check it is an Automorphic Number. Automorphic number is the number, which is contained in the last digit(s) of its square. For e.g. 25 is an automorphic number as its square is 625 and 25 is present as the last two digits. QUESTION 11 (i)A linked list is formed from the objects of the class: [4] class Node{ int num; Node next;} Write an Algorithm OR a Method to insert a node at the beginning of an existing linked list. The method declaration is as follows: void InsertNode( Nodes starPtr, int n ) [2] (ii) Answer the following questions from the diagram of a Binary Tree given below: (a) Write the in-order traversal of the above tree structure. (b) Name the children of the nodes B and G. (c) State the root of the right sub tree. [1] [1] [1]

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

iamtanmoy chat