Computer science programs class 12 isc, Assignments of Computer science

Computer Applications (Class XII, ICSE/ISC) 2025-26** Highly useful for Class 12 ISC Computer Applications final exam / board practical preparation, pre-board, school projects, and BlueJ programming practice for 2025–26 session. Contains full question set with examples and exact specifications required for 100% scoring solutions.

Typology: Assignments

2024/2025

Uploaded on 11/24/2025

59bhaswata-ganguly
59bhaswata-ganguly 🇮🇳

3 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
St. Stephen’s Group of Schools
FINAL ASSIGNMENT 2025 2026
Class: XII
Subject: Computer Science
Question 16 :
Write a program to declare a square matrix M[][] of order (N × N)
where ‘N’ must be greater than 3 and less than 10. Allow the user to
input positive integers into this matrix. Perform the following tasks on
the matrix:
(a)
Sort the boundary elements in ascending order using any standard
sorting technique and rearrange them in the matrix in clockwise
manner.
(b)
Calculate the product of the non-boundary elements.
(c)
Display the original matrix, rearranged matrix and only the non-
boundary elements of the rearranged matrix with their product.
Test your program for the following data and some random data:
Example 1
INPUT: N = 4
pf3
pf4
pf5
pf8

Partial preview of the text

Download Computer science programs class 12 isc and more Assignments Computer science in PDF only on Docsity!

St. Stephen’s Group of Schools FINAL ASSIGNMENT 2025 – 2026 Class: XII Subject: Computer Science Question 16 : Write a program to declare a square matrix M[][] of order (N × N) where ‘N’ must be greater than 3 and less than 10. Allow the user to input positive integers into this matrix. Perform the following tasks on the matrix: (a) Sort the boundary elements in ascending order using any standard sorting technique and rearrange them in the matrix in clockwise manner. (b) Calculate the product of the non-boundary elements. (c) Display the original matrix, rearranged matrix and only the non- boundary elements of the rearranged matrix with their product. Test your program for the following data and some random data: Example 1 INPUT: N = 4

rix Non-Boundary Elements 10 9 5 3 PRODUCT OF THE NON-BOUNDARY ELEMENTS = 1350 Question 17 : A Vampire number is a composite natural number with an even number of digits that can be factored into two natural numbers each with half as many digits as the original number and not both with trailing zeros, where the two factors contain precisely all the digits of the original number, in any order of counting multiplicity. Example: 1260 = 21 × 60 (where, 21 and 60 contain precisely all the digits of the number) Thus, 1260 is a Vampire number. Accept two positive integers m and n, where m < n and values of both ‘m’ and ‘n’ must be >= 1000 and <= 9999 as user input. Display all Vampire numbers that are in the range between m and n (both

Output: Original 11 2 5 Mat 7 8 10 9 4 15 5 3 11 1 17 14 8 Rearranged Matrix 1 2 4 5 17 10 9 7 15 5 3 8 14 11 11 8

Example 2 INPUT: DAY NUMBER: 321 YEAR: 2023 N: 77 OUTPUT: ENTERED DATE: NOVEMBER 17, 2023 77 DAYS LATER: FEBRUARY 2, 2024 Question 19 : A snowball string is a sentence where each word is arranged in ascending order of their length and is also consecutive. For example “I am the Lord” is a snowball string as Length of word ‘I’ is 1 Length of word ‘am’ is 2 Length of word ‘the’ is 3 Length of word ‘Lord’ is 4 The length of each word is one more than the previous word. Hence they are consecutive and in ascending order. Write a program to enter any sentence and check if it is a snowball string or not. The words in the sentence may be separated by one or more spaces and terminated by ‘.’ or ‘?’ only. The program will generate appropriate error message for any other terminating character. Example 1 INPUT: He may give bonus. OUTOUT: IT IS A SNOWBALL STRING Example 2 INPUT: Is the cold water frozen? OUTPUT: IT IS A SNOWBALL STRING Question 20 :

Write a program to declare a square matrix M[][] of order ‘N’ where ‘N’ must be greater than 3 and less than 10. Accept the value of N as user input. Display an appropriate message for an invalid input. Allow the user to accept three different characters from the keyboard and fill the matrix according to the instruction given below: (i) Fill the four corners of the square matrix by character 1 (ii) Fill the boundary elements of the matrix (except the four corners) by character 2 (iii) Fill the non-boundary elements of the matrix by character 3 (iv) Display the matrix formed by the above instructions Test your program for the following data and some random data: Example 1 INPUT: N = 4 Enter first character: @ Enter second character : ? Enter third character: # OUTPUT: Formed Matrix: @ ?

Question 21 : Write a program to accept a sentence which may be terminated by either ‘.’ or ‘?’ or ‘!’ only. Any other character may be ignored. The words may be separated by more than one blank space and are in uppercase. Perform the following tasks: Accept a sentence and remove all the extra blank space between two words to a single blank space.

This password is 5 characters long and is missing an uppercase and a special character. The minimum number of characters to add is 2. Password : ‘2bb#A’ This password is 5 characters long and has at least one of each character type. The minimum number of characters to add is 1. Question 23 : Julius Caesar protected his confidential information by encrypting it using a cipher. Caesar's cipher shifts each letter by a number of letters. If the shift takes you past the end of the alphabet, just rotate back to the front of the alphabet. In the case of a rotation by 3, w, x, y and z would map to z, a, b and c. Sample Input: 11 middle-Outz 2 Sample Output: okffng-Qwvb Question 24 : Given a square matrix, calculate the absolute difference between the sums of its diagonals. For example, the square matrix arr is shown below: Example 1: 1 2 3 4 5 6 9 8 9 The left to right diagonal = 1+5+9 = 15 The right to left diagonal = 3+5+9 = 17 Absolute difference = | 15 – 17| = 2

Question 25 : Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space- separated long integers. Example : Input : 1 2 3 4 5 Output : 10 14 Explanation The numbers are 1,2 ,3, 4, and 5. Calculate the following sums using four of the five integers:

  1. Sum everything except 1, the sum is 2+3+4+5=14.
  2. Sum everything except 2, the sum is 1+3+4+5=13.
  3. Sum everything except 3, the sum is 1+2+4+5=12.
  4. Sum everything except 4, the sum is 1+2+3+5=11.
  5. Sum everything except 5, the sum is 1+2+3+4=10.