Class IX Computer Applications – Test (20
Marks)
Section A: Short Answer Questions (10 Marks)
Q1. Differentiate between pre-increment and post-increment operators in Java with an
example.
(2 marks)
Q2. Write the Java expression for:
(2 marks)
Q3. Arrange the following operators in order of precedence (highest → lowest):
++ * + % && =
(2 marks)
Q4. Explain with an example how type casting is done in Java. Distinguish between implicit
and explicit casting.
(2 marks)
Q5. Answer briefly:
a) Define class and object in Java with examples.
b) What is the difference between primitive datatypes and reference datatypes?
(2 marks)
Section B: Programming (10 Marks)
Q6. Write a program in Java to check whether a given number is Prime.
(5 marks)
Q7. Write a program in Java to check whether a given number is an Armstrong Number.
(5 marks)