0% found this document useful (0 votes)
14 views2 pages

ICSE SET 3

ICSE Computer Science Paper

Uploaded by

ishita.k.dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

ICSE SET 3

ICSE Computer Science Paper

Uploaded by

ishita.k.dey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

COMPUTER APPLICATIONS

(Theory)
(Two hours)
SECTION A (40 Marks)
Attempt all questions

Question 1
i) Differentiate between actual parameter and formal parameter with the help of examples [3]
ii) Give the output of the following
int x=5++<=--6?5:6;
System.out.println (x); [3]

iii) What will be the value if x=3 initially


x+=x++---x+x -- [2]
iv) Define operator and operand [2]
Question2
i) Give the output
class super{
void in( )
{
x=10,y=20;
if(x<y||(x==5)>10)
System.out.println(x);
else
System.out.println(y);
}
} [3]

ii) Define default constructor and why is it called so? [3]


iii) Distinguish between pure and impure functions with examples [4]

Question 3

i) Give the output

class outt
{
public void av( )
{
for(i=0;i<=10;i++)
{
if(i==6)
break;
}
System.out.println(a);
}
} [2]

ii) Define encapsulation,inheritance,polymorphism [6]

iii) What is call by value and call by reference? [2]


Question 4

i) What is NumberFormatException? Present a suitable example [2]


ii) Are there any demerits of array? If so, write briefly [2]
iii) For initial value of a=4, b= -3, c=0, what will be the value of the x in following expressions, if they took
place successively? [4]
x = a+ b++ + --c +++b –c++
x += ++b +++a +- -c+ a
iv) What is wrapper class? Mention name of any two wrapper class [2]
SECTION B (60 Marks)
Attempt any four questions from this Section
.
The answers in this Section should consist of the Programs in either Blue J environment
or any program environment with Java as the base. Each program should be written
using Variable descriptions/Mnemonic Codes such that the logic of the program is
clearly depicted.
Flow-Charts and Algorithms are not required.

Question 5
Input a sentence and a word; print the output after excluding that word from that sentence (if found).
Sample Input: Arghajyoti is very nice boy. His performance is very good so far.
Keyword: very
Sample Output: Arghajyoti is nice boy. His performance is good so far. [15]

Question 6
Write a program to display all DISARIUM numbers upto 2000. A number will be called DISARIUM if sum of its
digits powered with their respective position is equal with the number itself. [15]
e.g; 135 is a DISARIUM
(Workings 11+32+53 = 135, some other DISARIUM numbers are 89, 175, 518 etc)

Question 7
Input a number and and print the digits with the highest frequency. If more than one digit is having highest
frequency, all of them will be printed
e.g1 : input 212342
output Digit 2, frequency 3
e.g 2;
input 24542
output Digit 2, frequency 2
Digit 4 , frequency 2
[15]
Question 8
Input a sentence (sen), a word to search (srchwrd) and another word to replace (repwrd). Find the occurrence
of search keyword within the given string, finally display the sentence after replacing with the replace keyword.
Also display its occurrences in number. [15]
(Note it will search from every position within the string, even from middle of a word also)
Sample Input: Disari Public School is located in Haldia. It is co-ed residential cum day boarding School.

Search Keyword: is
Replace Keyword: IS
Sample Output : DISari Public School IS located in Haldia. It IS co-ed residential cum day boarding School.

Question 9
Display the output in the following pattern [15]
A B C D E D C B A
A B C D D C B A
A B C C B A
A B B A
A A
(Remember, tab spaces are not there in reality)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy