0% found this document useful (0 votes)
54 views5 pages

ICSE Class IX Computer Applications Sample Paper

Uploaded by

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

ICSE Class IX Computer Applications Sample Paper

Uploaded by

Alexi Shirley
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ICSE Answer Paper – Sample Paper

Class IX
—————————————————————————————————————-
COMPUTER APPLICATIONS
(Theory)
(Two Hours)
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed for writing the
answers.
—————————————————————————————————————-
This Paper is divided into two Sections.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets[]
—————————————————————————————————————-

SECTION A (40 Marks)


Answer all questions from this Section

Q1 (i) int var = ‘A’;


What is the value of var?
(ii) Name the package that contains wrapper classes.
Q2 Identify whether they are primitive or non-primitive types
(i) String (ii) arrays (iii) char (iv) classes
Q3 [Link](“BEST “);
[Link](“OF LUCK”);
Choose the correct option for the output of the above statements:
(i) BEST OF LUCK
(ii) BEST
OF LUCK
Q4 Write a Java expression for the following:

Q5 Give the output of the following:


(i) [Link](-4.7)
(ii) [Link](3.4) + [Link](2, 3)

Q6 Convert the following if else if construct into switch case:

if(var == 1)
[Link]("good");
else if(var == 2)
[Link]("better");
else if(var == 3)
[Link]("best");
else
[Link]("invalid");

Q7 (i) State the number of bytes occupied by char and int data types?
(ii) Write one difference between / and % operator.

Q8 Give the output of the following program segment and also mention the number
of times the loop is executed:
int a,b;
for(a=6,b=4;a<=24;a=a+6)
{
if(a%b==0)
break;
}
[Link](a);

Q8 What is the value of y after evaluating the expression given below?


y += ++y + y– + –y; when int y = 8.

Q9 What do you mean by Intellectual Property Rights? Name any of its 2 properties?

Q10 What is SPAM? Give 2 ways to prevent SPAM.

Q11 The following program is supposed to check the given number is prime or not.
Some part of the program is replaced by ______, with the numbering 1 to 5, fill this
part so that program works correctly.

class checkPrime {
public static void main(String args[]) {
int i, f=0;
int n = [Link](args[0]);
for(i=__1__; __2__; i++)
{
if(__3__==0)
{
f=__4__;
break;
}
}
if(f==__5__)
[Link](“The given no. “+n+” is a prime number”);
else
[Link](“The given no. “+n+” is not a prime number”);
}
}
Q11 Give the output and show the dry run.
public static void abc()
{
int x=1, i=2;
do
{
x*=i;
}while(++i<=5);
[Link](x);
}

Q12 What is the output of the following?


char c = ‘A’;
short m = 26;
int n = c + m;
[Link](n);

Q13 Analyse the given program segment and answer the following questions:

for(i = 3; i <=4; i++)


{
for(j=2; j<i; j++)
{
[Link](""),
}
System. [Link]("WIN");
}

1. How many times does the inner loop will execute?

2. Write the output of the program segment.

Q14 Give the output of the following program.


int i,j;
for (i=0; i<4; i++)
{
for (j=i; j>=0; j--)
[Link](j);
[Link]();
}
Q15 What will be the output of the following code?

int m=2
int n=15;
for(int i=1;i<5;i++)
m++; - - n;
[Link]("m="+m);
[Link]("n="+n);

Q16 What do you mean by type conversion? How is implicit conversion different
from explicit conversion?

Q17 What is difference between ASCII and Unicode. Which one does Java uses?
Q18. What are ASCII codes for small letters?
Q18 Why is Java called as Platform Independent Language?
Q19 What is difference between Local, Instance, Global and Class Variables?
Q20 What is the difference between if and switch?
SECTION B (60 MARKS)

Q1 A library charges fine for books returned late.


Following are the fines:
first five days 40 paisa per day
Six to ten days 65 paisa per day
above 10 days 80 paisa per day.
Design a program to calculate the fine assuming that a book is returned N days
late.

Q2 Generate the pattern :


*
***
*****
*******
*****
***
*
Q3 WAP to accept a number and check whether the number is perfect number or not.
A number is called perfect number, if the sum of all factors (except number itself) of
the number is equal to that number. (For e.g. 6 is a perfect number. Factors are 1, 2 &
3 and the sum is 1+2+3 = 6.)

Q4. Find the sum of the series.


S = (X+1)2+(X+2)3+(X+3)4+(X+4)5+…………… +(X+N)N+1

Q5. The volume of solids, viz. cuboid, cylinder and cone can be calculated by the
Formula:
1.
1. Volume of a cuboid: (v = l × b × h)
2. Volume of a cylinder: (v = π× r²× h)
3. Volume of a cone: (v = 1/3× π × r²× h) (π = 22/7)

Using a switch case statement, write a program to find the volume of different solids
by taking suitable variables and data types.
Q6. A special two-digit number is such that when the sum of its digits is added to the
product of its digits, the result is equal to the original two-digit number.
Example: Consider the number 59.
Sum of digits = 5 + 9 = 14
Product of digits = 5 * 9 = 45
Sum of the sum of digits and product of digits = 14 + 45 = 59

Write a program to accept a two-digit number. Add the sum of its digits to the
product of its digits. If the value is equal to the number input, then display the
message “Special 2 – digit number” otherwise, display the message “Not a special
two-digit number”.

Common questions

Powered by AI

In Java, local variables are declared within a method or a block and are accessible only within that scope; they do not hold a default value and must be initialized before use. Instance variables are non-static and are defined at the class level but outside any method; they represent the state of an object and have default values. Global variables, a concept not inherently supported by Java, can be simulated by using public static variables at the class level. Class variables are static variables and belong to the class itself rather than any instance of the class. These are shared across all instances of the class, providing a common value or state that is the same across different objects of the class .

The output of the expression 'y += ++y + y-- + --y' illustrates the behavior of pre-increment (++y), post-decrement (y--), and pre-decrement (--y) operators. When evaluated, '++y' increments the value of y before it is used in the expression, while 'y--' uses the current value of y and then decrements it after the operation. Similarly, '--y' decrements the value of y before it is used. These pre and post operations lead to somewhat complex and often unexpected results due to the order in which values are incremented or decremented and applied in the overall expression. Specifically, this illustrates how pre and post operators can affect the final outcome when used in compound expressions .

Java is termed a platform-independent language because of its ability to run the same bytecode on any platform that has a JVM (Java Virtual Machine) compatible with that platform. The Java compiler converts source code into bytecode, which is not specific to any particular machine architecture. This bytecode can be interpreted or compiled on the fly to native machine instructions at runtime by the JVM, enabling it to run on any device equipped with a suitable JVM, regardless of the underlying hardware architecture .

Intellectual Property Rights (IPR) are important because they give creators legal protection over their creations, thus encouraging innovation by ensuring creators can earn recognition or financial benefit from their inventions. Two properties of IPR are copyrights, which protect the expression of ideas such as artwork, music, and written works, and patents, which protect new inventions or processes with a novel and useful function .

It is essential for programming assignments to evaluate multiple skills such as control flow, operators, and data types because a strong understanding of these fundamental concepts is crucial for writing efficient and correct code. Control flow structures such as loops and conditional statements dictate the logic and flow of execution within programs. Operators enable various calculations and manipulations of data. Understanding different data types and their characteristics supports correct data representation and manipulation. These skills together contribute to the ability to solve problems programmatically, a key objective of learning programming .

ASCII (American Standard Code for Information Interchange) is a 7-bit character encoding scheme that primarily represents English characters and control codes. It covers 128 characters and is sufficient for encoding standard English text. Unicode, on the other hand, is a more comprehensive encoding system that can represent characters from all the world’s writing systems. It is a 16-bit system, allowing for a much wider range of characters. Java uses Unicode, which allows it to be platform-independent and support internationalization by representing characters from various languages .

Type conversion in Java refers to changing one data type into another. Implicit conversion, also known as automatic or widening conversion, occurs when a smaller data type is converted into a larger one (e.g., int to double) automatically by the Java compiler. Explicit conversion, or narrowing conversion, requires a cast operator to convert a larger data type into a smaller one (e.g., double to int), as this may result in loss of information or precision and thus requires explicit permission from the programmer .

To correct the Java program segment for identifying prime numbers, replace the placeholders with appropriate values: initialize 'i = 2', set the loop condition '__2__' to 'i <= n/2', and make the condition '__3__' equal to 'n % i'. Set 'f = 1' when a factor is found (inside the if block), and initialize 'f' to 0 at the start of the function. When 'f' is still 0 after the loop, print that the number is a prime. Otherwise, print that it is not prime. These adjustments ensure the program correctly identifies whether 'n' is divisible by any number other than 1 and itself .

SPAM refers to unsolicited email messages, typically sent in bulk to a large list of addresses, often for advertising or phishing purposes. Two methods to prevent SPAM include using SPAM filters, which automatically identify and remove or mark SPAM messages from an inbox, and using email authentication protocols such as SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail), which help verify the sender's identity and ensure the legitimacy of messages .

The 'switch case' statement is used to simplify complex 'if-else' constructs when the variables being tested are all compared to constant values. It evaluates a single expression against multiple cases and executes the block of code corresponding to the first matching case. The switch statement is typically more readable and easier to maintain for multiple discrete values compared to 'if-else' statements, which are better suited for complex conditions involving ranges or logical operations. However, switch statements are limited to evaluating constants (integral types, enumerated types, and strings in modern Java), whereas 'if-else' statements can evaluate a wider range of boolean expressions .

You might also like