0% found this document useful (0 votes)
2 views3 pages

Holiday Homework Computer Std 9

The document contains holiday homework for Class IX students at Rajendra Vidyalaya, Jamshedpur, focusing on Computer Applications. It includes a series of programming questions that require students to predict outputs or identify errors in Java code snippets, along with several programming tasks such as swapping numbers, finding the greatest number, calculating simple interest, and applying discounts and GST. The homework is designed to enhance students' understanding of Java programming concepts and arithmetic operations.
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)
2 views3 pages

Holiday Homework Computer Std 9

The document contains holiday homework for Class IX students at Rajendra Vidyalaya, Jamshedpur, focusing on Computer Applications. It includes a series of programming questions that require students to predict outputs or identify errors in Java code snippets, along with several programming tasks such as swapping numbers, finding the greatest number, calculating simple interest, and applying discounts and GST. The homework is designed to enhance students' understanding of Java programming concepts and arithmetic operations.
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
You are on page 1/ 3

RAJENDRA VIDYALAYA, JAMSHEDPUR

HOLIDAY HOMEWORK
STD. – IX (2025-26)
SUBJECT – COMPUTER APPLICATIONS

Predict the output or find the errors if any, also mention the reason of the error

Sl. No. Questions


1 int x = 5;
x = x++ + ++x;
System.out.println(x);
2 int result = 0;
result = (i++) + (++i);
System.out.println(result);
3 int a-= 2, b = 3;
a = a++ * b-- + --a;
System.out.println(a);
4 int num = 0;
num*= (num++) + (num++);
System.out.println(num);
5 int m = 10, n = 5;
m = m ----- n + n++ + ++m;
System.out.println(m + " " + n);
6 int x = 1;
x = x++ + x;
System.out.println(x);
7 int result = 0;
result += (i--) + (++i);
System.out.println(result);
8 int a = 3, b = 2;
b /= a-- * ++b - b++;
System.out.println(b);
9 int num = 0;
num += (num++) + (num++);
System.out.println(num);
10 int p = 5, q = 3;
q = q-- + p++ - --q + ++p;
System.out.println(p + " " + q);
11 int m = 7, n = 6;
m %= (m++) - (--n) + (++m);
System.out.println(m + " " + n);
12 int x = 2;
x = (x++) + (x++) - (x--);
System.out.println(x);
13 int a = 4, b = 1;
a = a-- * ++b - (a++);
System.out.println(a + " " + b);
14 num=-5;
num += (num++) - (--num) + (num++);
System.out.println(num);
15 int p = 6, q = 7;
p = ++q + p-- - (p++) - q--;
System.out.println(p + " " + q);
16 int x = 3;
x-= x++ + x------ x;
System.out.println(x);
17 int result = 0;
result += (++result) + (result++);
System.out.println(result);
18 int a = 4, b = 2;
a = a-- + --b - (a++);
System.out.println(a + " " + b);
19 int p = 5, q = 6;
q += (p++) + (--q) - (q++) + (++p);
System.out.println(p + " " + q);
20 int a = 3, b = 3;
a = ++a + --b + (a++) - (--b);
System.out.println(a + " " + b);
21 int a = 2, b = 3, c = 4;
c = (++a) + (b--) - (--c);
System.out.println(a + " " + b + " " + c);
22 int result = 0;
result += (++result) + (result--) + (--result);
System.out.println(result);
23 int x = 1, y = 2, z = 3;
x = (++x) + (y++) - (--z);
System.out.println(x + " " + y + " " + z);
24 int p = 5, q = 6, r = 7;
r %= (p++) + (--q) - (r++);
System.out.println(p + " " + q + " " + r);
25 int x = 2, y = 3, z = 4;
z = (x--) - (++y) + (--z);
System.out.println(x + " " + y + " " + z);

Write java program for following :


1. Write a program, to accept two numbers and swap them without using third variable.
2. Write a java program to input two numbers and display the greatest no.
3. Write a java program to input Principal, rate and time and display simple interest and amount.
4. Write a Java program to input the cost price of a laptop and calculate the final price after applying a
discount of 5%. Display the final price.
5. Write a Java program to input the cost price of a phone and calculate the final price after adding GST at
the rate of 12.5%. Display the final price.

You might also like