ICSE Computer Application - Class X - 2016 PYQ
Table of Content:
Table of Content:
Give the output of the following Math functions:
if (x%2 == 0) System.out.print("EVEN"); else System.out.print("ODD");
int m = 5, n = 10; while (n>=1) { System.out.println(m*n); n--; }
Analyze the given program segment and answer the following questions:
for(int m = 5; m <= 20; m += 5) { if(m % 3 == 0) break; else if(m % 5 == 0) System.out.println(m); continue; }
Give the output of the following expression:
a+= a++ + ++a + --a + a-- ; when a = 7
Give the output of the following string functions:
Name the type of error ( syntax, runtime or logical error) in each case given below:
If int x[] = { 4, 3, 7, 8, 9, 10}; what are the values of p and q ?
What are the types of casting shown by the following examples:
Write a function prototype of the following:
A function PosChar which takes a string argument and a character argument and returns an integer value.
Write the return type of the following library functions:
Using the switch statement, write a menu driven program for the following:
(i) To print the Floyd’s triangle [Given below]
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
(b) To display the following pattern:
I
I C
I C S
I C S E
For an incorrect option, an appropriate error message should be displayed.
Special words are those words which start and end with the same letter.
Example: EXISTENCE, COMIC, WINDOW
Palindrome words are those words which read the same from left to right and vice-versa.
Example: MALYALAM, MADAM, LEVEL, ROTATOR, CIVIC
All palindromes are special words but all special words are not palindromes.
Write a program to accept a word. Check and display whether the word is a palindrome or only a special word or none of them.
Design a class to overload a function sumSeries() as follows:
Write a program to accept a number and check and display whether it is a Niven number or not.
(Niven number is that number which is divisible by its sum of digits.).
Example:
Consider the number 126. Sum of its digits is 1 + 2 + 6 = 9 and 126 is divisible by 9.
Write a program to initialize the seven Wonders of the World along with their locations in two different arrays. Search for a name of the country input by the user. If found, display the name of the country along with its Wonder, otherwise display "Sorry not found!".
Seven Wonders:
CHICHEN ITZA, CHRIST THE REDEEMER, TAJ MAHAL, GREAT WALL OF CHINA, MACHU PICCHU, PETRA, COLOSSEUM
Locations:
MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY
Examples:
Country name: INDIA
Output: TAJ MAHAL
Country name:
USA
Output: Sorry Not found!