ISC Class 12 Computer Science Paper 2 Previous Year Question Paper 2020 Download in PDF. This Old Question Paper also known as ISC Specimen Paper 2020 Class 12 Computer Science Paper 2 included all Chapter of ISC Syllabus Boolean Algebra, Computer Hardware, Implementation of Algorithms to Solve Problems, Programming in Java , Objects, Primitive Values, Wrapper Classes, Types and Casting, Variables, Expressions, Statements, Scope, Methods,Arrays, Strings,Recursion, Inheritance, Interfaces and Polymorphism, Data Structures
ISC Class 12 Computer Science Paper 2 Previous Year Question Paper 2020 from Chapter Boolean Algebra, Computer Hardware, Implementation of Algorithms to Solve Problems, Programming in Java , Objects, Primitive Values, Wrapper Classes, Types and Casting, Variables, Expressions, Statements, Scope, Methods, Arrays,Strings, Recursion, Inheritance, Interfaces and Polymorphism, Data Structures
Question 1:
An Evil number is a positive whole number which has even number of 1’s in its binary equivalent. Example: Binary equivalent of 9 is 1001, which contains even number of 1’s. Thus, 9 is an Evil Number.
A few Evil numbers are 3, 5, 6, 9….
Design a program to accept a positive whole number ‘N’ where N> 2 and N>2 and <100. Find the binary equivalent of the number of 1s in it and display whether it is an Evil number or not with an appropriate message.
Test your program with the following data and some random data:
Example 1:
INPUT: N = 15
BINARY EQUIVALENT: 1111
NUMBER OF 1’s: 4
OUTPUT: EVIL NUMBER
Example 2:
INPUT: N = 26
BINARY EQUIVALENT: 11010
NUMBER OF 1’s: 3
OUTPUT: NOT AN EVIL NUMBER
Example 3:
INPUT: N = 145
OUTPUT: NUMBER OUT OF RANGE
Question 2:
The potential of a word is found by adding the ASCII value of the alphabets. (ASCII values of A to Z are 65 to 90).
Example: BALL Potential = 66 + 65 + 76 + 76 = 283
Write a program to accept a sentence which may be terminated by either “ . ” , “ ? ” or “ ! ” only. The words of sentence are separated by single blank space and are in UPPER CASE. Decode the words according to their potential and arrange them in ascending order of their potential strength.
Test your program with the following data and some random data:
Example 1:
INPUT: HOW DO YOU DO?
OUTPUT:
HOW = 238
DO = 147
YOU = 253
DO = 147
DO DO HOW YOU
Example 2:
INPUT: LOOK BEFORE YOU LEAP.
OUTPUT:
LOOK = 309
BEFORE = 435
YOU = 253
LEAP = 290
YOU LEAP LOOK BEFORE
Example 3:
INPUT: HOW ARE YOU#
OUTPUT: INVALID INPUT
Question 3:
Write a program to declare a square matrix M [ ] [ ] of order ‘N’ where ‘N’ must be greater than 3 and less than 10. Allow the user to accept three different characters from the keyboard and fill the array according to the instruction given below:
(i) Fill the four corners of the square matrix by character
(ii) Fill the boundary elements of the matrix (except the four corners) by character (iii) Fill the non-boundary elements of the matrix by character Test your program with the following data and some random data:
Example 1:
INPUT: N = 4
FIRST CHARACTER: @
SECOND CHARACTER: ?
THIRD CHARACTER: #
OUTPUT: @ ? ? @
? # # ?
? # # ?
@ ? ? @
Example 2:
INPUT: N = 5
FIRST CHARACTER: A
SECOND CHARACTER:
C THIRD CHARACTER: X
OUTPUT: A C C C A
C X X X C
C X X X C
C X X X C
A C C C A
Example 3:
INPUT: N = 12
OUTPUT: SIZE OUT OF RANGE