228 Grade Ix Revision Worksheet Term1 Computerapplication
228 Grade Ix Revision Worksheet Term1 Computerapplication
COMPUTER APPLICATION
Term 1, 2024-25
GRADE: IX
Attempt all questions from this Section
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.)
(ii) Rewrite the following program after removing the errors, underlining each corrections:
class My Class
{
int a, b;
void initialize( )
{
a=5;
b=6;
ICSE 2
}
void show( )
{
System.out.println(a+ “ ”+ b);
}
static void main( )
{
My Class ob = new My Class( );
ob.initialize( );
show( ).ob;
}
}
(iii) State with reasons why is the following initializations incorrect:
int a=5;
short b=a;
(iv) What will be the output of the following program?
class Output1
{
static void main()
{
int a=5,b=6,c;
c=a+b%2;
b=a+2*c;
System.out.println(c);
System.out.println(b);
}
}
(v) What will be the output of the following, if x = 5 initially?
i. 5 *++x
ii. 5*x++
(vi) State the value a, b and c after the execution of each of the following statements
where a=12, b=13 and c=11:
a=a++ + – –b + c++;
Write a program to find the area and circumference of a circle accept radius from the user
Write a program to input the length and breadth of a rectangle and find its diagonal using
Mathematical library function.
ICSE 4