ISC Class 12 Computer Science Guess Paper 2027

Last updated:

A full practice paper on the official Computer Science pattern, built from the most-likely questions by repetition analysis. Not an official or leaked paper.

Download PDF
ISC Class 12 Computer Science — Guess Paper 2027
Time: 3 hours · Maximum marks: 70 · Practice paper
Section Part ICompulsory (20 marks). Question 1: ten one-mark parts (multiple choice, assertion-reason and very short answer). Question 2: infix notation conversion [2], address calculation of an array element [2], dry-run of a given function [3] and completing missing code ?1?, ?2?, ?3? [3].
Q1.
The complement of the Boolean expression a • b' + a' + a' • b is: (a) a + b' • a' • a' + b (b) (a' + b) • a • (a + b') (c) (a + b') • a' • (a + b') (d) a' • b + a + a • b'
Why this question: Boolean Algebra → MCQ: complement of a Boolean expression (De Morgan's theorem) — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
1 mark
Q2.
According to the Principle of Duality, the Boolean equation Q' • 0 + P' • Q' + P' • Q = P' will be equivalent to: (a) Q • 0 + P • Q + P • Q' = P (b) Q' • 1 + P' • Q' + P • Q' = P' (c) (Q' + 1) • (P' + Q') • (P' + Q) = P' (d) (Q' + 0) • (P' + Q') • (P' + Q) = P'
Why this question: Boolean Algebra → MCQ: dual of a Boolean equation (principle of duality) — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
1 mark
Q3.
The Boolean equations a + 1 = a and a • 0 = 0 correspond to: (a) Involution Law (b) Law of Identity (c) Distributive Law (d) Law of Complements
Why this question: Boolean Algebra → MCQ: identify the Boolean law (distributive, absorption, associative, idempotence...) — appeared 6× Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
1 mark
Q4.
Consider the two propositions given below: A = You use ecofriendly methods B = Pollution is reduced If A implies to B, then write its Contrapositive statement.
Why this question: Propositional Logic → Converse / inverse / contrapositive of an implication — appeared 6× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2025
1 mark
Q5.
Consider the following statement written in class Student where school_Name is its data member. static final String school_Name = "Co-Ed School"; Which of the following statements are valid for school_Name? I. All objects of class Student share the same value of school_Name. II. The value of school_Name cannot be changed during program execution. III. The keywords static and final cannot be used together for a variable. (a) Only I and II (b) Only II and III (c) Only I and III (d) Only III
Why this question: Methods → MCQ: which statements are valid for the given code (static final member / this) — appeared 3× Board 2025Board 2026Sample 2025
1 mark
Q6.
Given below are two statements marked, Assertion and Reason. Read the two statements carefully and choose the correct option. Assertion: An interface in Java contains abstract and non-abstract methods. Reason: All methods in an interface must be implemented by any class that extends this interface. (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) Both Assertion and Reason are false.
Why this question: Inheritance, Interfaces and Polymorphism → Interfaces in Java: use / purpose / properties — appeared 5× Board 2023Board 2024Board 2026Sample 2023Sample 2024
1 mark
Q7.
Given below are two statements marked Assertion and Reason. Read the two statements carefully and choose the correct option. Assertion: Recursion utilises more memory as compared to iteration. Reason: Time complexity of recursion is higher due to the overhead of maintaining the function call stack. (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.
Why this question: Recursion → Assertion-reason: recursion, memory and the call stack — appeared 2× Board 2024Sample 2025
1 mark
Q8.
Study the given propositions and the statements marked Assertion and Reason that follow. Choose the correct option based on your analysis. P = You practise regularly Q = You become skilled S1 = P => Q S2 = ~P ∨ Q Assertion: S1 and S2 are logically equivalent. Reason: A conditional statement P => Q can be expressed as ~P ∨ Q (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) Both Assertion and Reason are false.
Why this question: Propositional Logic → Assertion-reason: equivalence laws of propositions (implication, De Morgan) — appeared 2× Board 2025Board 2026
1 mark
Q9.
The worst case complexity for following code segment is: for(int i=1; i<= n; i++) { for(int j=1; j<= i; j++) { statement; } } (a) O(n+i) (b) O(n×i) (c) O(n) (d) O(n2)
Why this question: Complexity and Big O Notation → Big O (worst case) of a given loop / nested-loop code segment — appeared 3× Board 2025Board 2026Sample 2025
1 mark
Q10.
State any one difference between instance variable and class variable.
Why this question: Methods → State the relevance of static / this keywords; class vs instance variable — appeared 3× Board 2023Board 2024Sample 2024
1 mark
Q11.
Convert the following infix notation to prefix form. P / Q + ( S * F + X / R )
Why this question: Stacks and Queues → Convert an infix expression to postfix / prefix notation — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
2 marks
Q12.
A matrix G[3...7, 2...5] is stored in the memory, with each element requiring 4 bytes of storage. If the address of G[5][4] is 6000, find the base address when the matrix is stored Column Major Wise.
Why this question: Arrays → Find the address / base address of a 2-D array element (row major or column major) — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
2 marks
Q13.
The following function workOut( ) is a part of some class. Assume 'n' is a positive integer. String workOut (int n) { if (n == 0) return ""; int rem = n % 16; char cr = (rem < 10) ? (char)(rem + '0') : (char)(rem - 10 + 'A'); return workOut (n / 16) + cr; } Answer the questions given below with the dry run / working. (a) What will the function workOut(220) return? [2] (b) What is the function workOut( ) performing apart from recursion? [1]
Why this question: Recursion → Dry-run a recursive function: find its output and state what it does — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
3 marks
Q14.
The following function isTech( ) is a part of some class which is used to check if a given number is a Tech number or not. There are some places in the code marked by ?1?, ?2?, ?3? which may be replaced by a statement / expression so that the function works properly. A number is Tech number if the count of digits is even and the square of the sum of its two equal halves is equal to the number itself. Example: 2025 = 20 + 25 = (45)2 = 2025 boolean isTech(int n) { String s = String.valueOf(n); int len = ?1?; if(len % 2 != 0) return ?2?; int first = Integer.parseInt(s.substring(0, len / 2)); int second = Integer.parseInt(s.substring(len / 2)); int sum = first + second; return ?3? == n; } What are the expressions or statements at ?1?, ?2? and ?3?
Why this question: Methods → Fill in the missing code ?1? ?2? ?3? in a method (digit / number logic) — appeared 5× Board 2024Board 2025Board 2026Sample 2024Sample 2025
3 marks
Section APart II Section A - Boolean algebra and computer hardware. Three questions of 10 marks; answer any two (20 marks).
Q15.
According to the ancient laws of the Valley of Peace, a candidate can become the Dragon Warrior only if they satisfy any one of the following conditions: • The candidate belongs to the Panda Clan and has been trained for more than 5 years under the Grand Master OR • The candidate possesses the Secret Chi Power but does not belong to the Panda Clan OR • The candidate is recommended by the Grand Master, but neither belongs to the Panda Clan nor has been trained for more than 5 years The inputs are: C : Belongs to the Panda Clan T : Trained for more than 5 years P : Possesses Secret Chi Power R : Recommended by the Grand Master (In all the above cases, 1 indicates YES and 0 indicates NO) Output: X - Denotes eligibility to become the Dragon Warrior (1 = eligible and 0 = not eligible) Draw the truth table for the inputs and outputs given above. Write the SOP expression for X(C, T, P, R).
Why this question: Boolean Algebra → Truth table from a word problem (eligibility criteria) and write its SOP/POS expression — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
5 marks
Q16.
(a) What is a decoder? [1] (b) Draw the logic gate diagram for decoding the binary numbers {0011, 0100, 0101, 0111, 1011, 1110} to hexa-decimal numbers. [3] (c) State any one application of a multiplexer. [1]
Why this question: Computer Hardware → Encoder / decoder / multiplexer: define, differentiate and draw the logic circuit — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
5 marks
Q17.
(a) Reduce the Boolean function F(A,B,C,D) = π (0,1,2,3,7,8,9,10,11,12,13,15) 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]
Why this question: Boolean Algebra → Reduce F = π(...) by 4-variable K-map and draw the logic gate diagram — appeared 6× Board 2023Board 2024Board 2026Sample 2023Sample 2024Sample 2025
5 marks
Q18.
Draw a truth table to verify if the following proposition is a Tautology, a Contradiction or a Contingency. ( A ∧ ~B ) => ( ~A ∨ B )
Why this question: Propositional Logic → Verify by truth table whether a proposition is valid / a tautology, contradiction or contingency — appeared 6× Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
2 marks
Q19.
From the logic gate diagram given below, derive the Boolean expression for (1), (2) and Q. Reduce the derived expression. [Logic diagram with inputs A, B, C: an AND gate gives (1); NOT gates and an OR gate feed a second AND gate giving (2); (1) and (2) feed an OR gate giving Q - see figure]
diagram for Derive (and simplify) the Boolean expression from a given logic gate diagram
Why this question: Computer Hardware → Derive (and simplify) the Boolean expression from a given logic gate diagram — appeared 5× Board 2023Board 2025Board 2026Sample 2024Sample 2025
3 marks
Section BPart II Section B - Java programming. Three class-design programs of 10 marks; answer any two (20 marks). Programs must be written in Java.
Q20.
A class Perni has been defined to accept a positive integer in binary number system from the user and display if it is a Pernicious number or not. [A pernicious number is a binary number that has minimum of two digits and has prime number of 1's in it.] Examples: • 101 is a pernicious number as the number of 1's in 101 = 2 and 2 is prime number. • 10110 is a pernicious number as the number of 1's in 10110 = 3 and 3 is prime number. • 1111 is a NOT a pernicious number as the number of 1's in 1111 = 4 and 4 is NOT a prime number. The details of the members of the class are given below: Class name : Perni Data member/instance variable: num : to store a binary number Methods / Member functions: Perni( ) : constructor to initialise the data member with 0 void accept( ) : to accept a binary number (containing 0's and 1's only) int countOne(int k) : to count and return the number of 1's in 'k' using recursive technique void check( ) : to check whether the given number is a pernicious number by invoking the function countOne( ) and to display an appropriate message Specify the class Perni giving the details of the constructor( ), void accept( ), int countOne(int) and void check( ). Define a main( ) function to create an object and call the functions accordingly to enable the task.
Why this question: Recursion → Class program with a recursive method on a number (Dudeney, Pronic, Evil, Pernicious, Trimorphic, LCM, decimal to hex) — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
10 marks
Q21.
Design a class PendulumS to perform an operation on a word containing alphabets in upper case only. Rearrange the word by putting the lowest ASCII value character at the centre and the second lowest ASCII value character to its right and the third to its left and so on. Example 1 : Input : COMPUTER Output : TPMCEORU Example 2 : Input : SCIENCE Output : SIECCEN The details of the members of the class are given below: Class name : PendulumS Data members/instance variables: wrd : to store the original word newwrd : to store the rearranged word Methods/Member functions: PendulumS(String k) : parameterised constructor to initialise wrd = k and newwrd = "" int minCharIndex(String str) : to find the index of the minimum ASCII value character in str and return it void arrange( ) : to rearrange the characters of wrd as per the given instructions and store it in newwrd by invoking minCharIndex( ) void display( ) : to display the original word and the rearranged word Specify the class PendulumS giving the details of the constructor( ), int minCharIndex(String), void arrange( ) and void display( ). Define the main( ) function to create an object and call the functions accordingly to enable the task.
Why this question: Strings → Class program: rearrange / process the characters of a word (flip halves, pendulum, mask removal, ASCII codes) — appeared 4× Board 2024Board 2025Board 2026Sample 2025
10 marks
Section CPart II Section C - inheritance, data structures and complexity. Three questions of 5 marks; answer any two (10 marks).
Q22.
A superclass Hotel has been defined to store the details of a hotel. Define a subclass Customer to calculate the total bill for a customer as per the following criteria: Room type | Additional Amount Executive | 10% of room rent Suite | 20% of room rent The details of the members of both the classes are given below: Class name : Hotel Data members/instance variables: hname : to store hotel name roomrent : to store the rent per day Methods/Member functions: Hotel(...) : parameterised constructor to assign values to its data members void show( ) : to display hotel details Class name : Customer Data members/instance variables: cname : to store customer name days : to store the number of days of stay type : to store the room type surcharge : to store the additional amount amt : to store the total amount Methods/Member functions: Customer(...) : parameterised constructor to assign values to data members of both the classes void compute( ) : to calculate the surcharge based on the room type as given above. Also, to calculate the total amount as: (room rent + surcharge) × days void show( ) : to display hotel and customer details Assume that the superclass Hotel has been defined. Using the concept of Inheritance, specify the class Customer, giving details of constructor(...), void compute( ) and void show( ). The super class, main function and algorithm need NOT be written.
Why this question: Inheritance, Interfaces and Polymorphism → Inheritance program: define the subclass (constructor, compute method, show) given the super class — appeared 7× Board 2023Board 2024Board 2025Board 2026Sample 2023Sample 2024Sample 2025
5 marks
Q23.
A circular queue is a linear data structure that allows data insertion at the rear and removal from the front, with the rear end connected to the front end forming a circular arrangement. The details of the members of the class are given below: Class name : CirQueue Data members/instance variables: Q[ ] : array to hold integer values cap : maximum capacity of the circular queue front : to point the index of the front rear : to point the index of the rear Methods/Member functions: CirQueue(int n) : constructor to initialise cap = n, front = 0 and rear = 0 void push(int v) : to add integers from the rear index if possible else display the message "QUEUE IS FULL" int remove( ) : to remove and return the integer from front if any, else return -999 void print( ) : to display the elements of the circular queue in the order of front to rear (i) Specify the class CirQueue giving the details of the functions void push(int) and int remove( ). Assume that the other functions have been defined. The main( ) function and algorithm need NOT be written. [4] (ii) State one application of a circular queue. [1]
Why this question: Stacks and Queues → Queue / circular queue / dequeue class: write the add and remove functions and name the entity — appeared 5× Board 2023Board 2025Sample 2023Sample 2024Sample 2025
5 marks
Share:TelegramX