CARMEL SCHOOL
Padmanabhanagar, Bengaluru - 70
FIRST TERMINAL EXAMINATION 2025 - 26
Grade: 9
SUBJECT: COMPUTER APPLICATIONS(Key answer)
Time: 2hours Max. Marks: 100
Answers to this paper must be written on the paper provided [Link] will not be allowed to
write during the first 15 [Link] time is to be spent reading the question paper.
The time given at the head of this paper is inclusive of reading time. The intended marks for
questions or parts of questions are given in brackets [ ].
Section-A(40 marks)(Attempt all questions)
Question 1
I. Choose the correct answer to the questions from the given options: [10]
(Do not copy the question, write the correct answer only)
1) _________ is created after the compilation of java source code.
a) object code b) machine code
c) byte code d) Executable file
2) The numeric data type that requires the least memory size is _______.
a) int b) short c) byte d) double
3) Which of the following would compile without error?
a) int a = [Link](-5); c) int b = [Link](5.0);
b) int d = [Link](5.5-7.5); d) int c = [Link](5.5F);
4) Give the output for the following:-
int a=20,b=4,c=4,d;
d=a+b%c;
[Link](d+c+ "is the output");
a) 23is the output b) 24is the output
c) 27is the output d) dcis the output
5) Which among the following is not a logical operator?
a) && b) || c) ! d) <=
6) Which statement is true about Java concatenation?
a) + is only used for addition
b) + acts as concatenation operator if at least one operand is a String
c) + between char and int always produces a String
d) Parenthesis do not affect concatenation
7) The output of [Link]("Hi" + (2 + 3) + (4 + 5)); is
a) Hi2345 b) Hi14 c) Hi59 d) Hi23+45
8) Give the output of the following:-
char ch = 'A' ; int k = 1;
[Link]("Value = " +(ch+k) );
a) Value = A1 b) Value = 66 c) Value = B d) Error
9) ________ refers to the reserved words that has special meaning to the java compiler.
a) identifier b) keyword c) main d) comments
10) Assertion (A): Java is centered around the concepts of objects, which represent
real-world entities and encapsulate both data and behaviour.
Reason (R): Java is an Object-Oriented Programming Language.
a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct
explanation of Assertion (A)
b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct
explanation of Assertion (A)
c) Assertion (A) is true and Reason (R) is false
d) Assertion (A) is false and Reason (R) is true
Question 2
I Name the OOP principle depicted in the following:- [4 x 1 = 4]
a) You can borrow books by scanning your library card, but the database that keeps track
of all books and borrowers is hidden and protected. Encapsulation
b) The word “play” can refer to playing a musical instrument, playing a sport, or playing
a video game. Polymorphism
c) Using the camera app on the smartphone, you just tap the screen to take a photo,
without needing to understand how the lens and sensor work internally. Abstraction
d) A locker in a gym can only be opened with a key or code. Encapsulation
II Give the full form of the following:- [2 x 1 = 2]
a) jdk java development kit b) JVM java virtual machine
III Give the memory space for the following(in bits) :- [2 x 1 = 2]
a) \t 16 b) 23.5 64
IV Give the default value of the following data types:- [2 x 1 = 2]
a) char ‘\u0000’ b) boolean false
Question 3
I State if the following is a valid or invalid identifier. If invalid, state
the reason:- [3 x 1 = 3]
a) _sum1 valid b) 5star invalid c) Int valid
II Write a java statement for the following:- [2 x 1 = 2]
a) To increase the value of the variable, x by 100 using shorthand operator.
x+=100;
b) To declare 3 float variables A, B and C.
float A, B, C;
III Give the output for the following code snippets:- [1+1+1+2]
a) [Link]([Link](12.0, 38/3)); ➔12.0
b) int x = 5, y = 12;
[Link](x%y > y%x); ➔ true
c) [Link]([Link](125)); ➔ 5.0
d) [Link]("Repeater\n\n");
[Link]("Router\n\n");
[Link]("Hub");
Repeater
_______
Router
_______
_______
Hub
Question 4
I Which data type will be most appropriate to store the following:- [3 x 1 = 3]
a) Number of days in a week byte
b) Population of a city long
c) First letter of your school char
II Write java expression for the following:- [2 x 2 = 4]
3 3
√𝑎 − √𝑏
a) M= M = ([Link](a)-[Link](b))/(a+b);
𝑎+𝑏
2𝑎𝑏 +3𝑏 𝑎
b) K = K = (2*[Link](a,b)+3*[Link](b,a))/(5+[Link](a));
5+√𝑎
III Evaluate the following expression and write the output:-
a) int a = 4, b = 6; [3]
a-= ++a – b++ *3;
[Link](a - b);
[Link](++a);
10
18
Section-B(60 marks)(Attempt all questions)Part I
Question 5
1) Write a short note on primitive data types in java. [2]
Primitive data types are the fundamental data types predefined by the language.
There are eight primitive data types supported by Java. They are byte, short,int,
float, double, char and boolean
2) Write any two limitations of using procedural language. [2]
3) Write the resulting data type of the following: - [2]
a) Mathematical expression with operands of int, long and double. double
b) Relational expression. boolean
4) Explain type casting with an example. [2]
Explicit conversion done by the user using ( ) operator to convert from higher data
type to lower data type and vice versa.
Example:
int x=10; double y=10.55;
int z=(int)(x+y);
5) Define the following:- [3]
a) class
b) encapsulation
6) Give the difference between unary operator and binary operator with 2
examples each. [3]
unary operator ➔ Requires one operand to perform [Link]:- ++, --, unary +,etc.
binary operator ➔ Requires two operands to perform [Link]:- +, -, /,*,etc.
7) Name the package in which Math class is defined. [1]
[Link]
Question 6
1) Rewrite the expression by filling the blanks with the appropriate operators to
get 13 as the value stored in the variable, c:- [2]
int a=7, b=3, c;
c=a __ b __ 2;
c=a+b*2;
2) Write a short note on escape sequence characters in java. [2]
In Java, an escape sequence is a special combination of characters used to represent
certain non-graphic characters that are difficult to type directly. These sequences always
begin with a backslash (`\`) followed by another character. Its data type is char
occupying 2 bytes.
3) Rewrite the jumbled java statements in the correct sequence to convert Km to m
and cm:- [5]
[Link]("Metres = "+m);
m=km*1000;
[Link]("Centimetres = "+cm);
int km=2, m, cm;
cm = m*100;
int km=2, m, cm; int km=2, m, cm;
m=km*1000; m=km*1000;
cm = m*100; [Link]("Metres = "+m);
[Link]("Metres = "+m); cm = m*100;
[Link]("Centimetres = "+cm); [Link]("Centimetres = "+cm);
4) Write 2 attributes and 2 behaviours of the following objects:- [4]
a) Cricket Ball b) Electric Kettle
5) Debug the following:- [2]
a) int m = 45.66f; ➔int m = 45; OR float m=45.66f;
b) char ch = "\\"; ➔ char ch = ‘\\’; OR String ch = "\\";
Part II
(Write variable description for all the programs)
Question 7
1) A cab driver earns ₹15 per km travelled. Write a program to accept the total
distance travelled in a day by him to display his net earnings. [7]
import [Link].*;
class taxi
{
public static void main()
{
Scanner sc=new Scanner([Link]);
[Link]("Enter the distance");
double dist = [Link]();
double amt = dist*15;
[Link]("The net earnings of the cab driver is "+amt);
}
}
2) A cinema hall charges ₹150 per person. An additional entertainment tax of 18% is
added on the total amount. Write a program to accept the number of customers and
calculate the total collection with tax. [8]
import [Link].*;
class cinemaHall
{
public static void main()
{
Scanner sc=new Scanner([Link]);
[Link]("Enter the number of customers");
int n = [Link]();
double amt = n*150;
double net = amt + 0.18*amt;
[Link]("The total collection is "+net);
}
}
Question 8
1) Write a program to accept the mass of the object(m) and velocity of the object(v)
to calculate the kinetic energy using the formula: [7]
import [Link].*;
class Kinetic
{
public static void main()
{
Scanner sc=new Scanner([Link]);
[Link]("Enter the mass and volume”);
double m=[Link]();
double v = [Link]();
double KE = 05 * m* v*v;
[Link]("Kinetic energy is “+KE);
}
}
2) A student earns 10 marks for each correct answer and loses 5 marks for each wrong
answer in a quiz. Write a program to accept the number of correct answers out of 40
questions to calculate the score of the student. [8]
import [Link].*;
class Quiz
{
public static void main()
{
Scanner sc=new Scanner([Link]);
[Link]("Enter the number of current answers”);
int correct = [Link]();
int wrong = 40 – correct;
int total = 10*correct – 5*wrong;
[Link]("The Score is “+total);
}
}