0% found this document useful (0 votes)
19 views4 pages

Computer - Full 1

This document is a Computer Application exam for Class IX, consisting of multiple-choice questions, assertion and reason-based questions, Java expressions, code snippets, and programming tasks. It covers topics such as data types, operators, Java methods, and basic programming concepts. Additionally, it includes practical applications like calculating discounts and equivalent resistance using Java programming.

Uploaded by

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

Computer - Full 1

This document is a Computer Application exam for Class IX, consisting of multiple-choice questions, assertion and reason-based questions, Java expressions, code snippets, and programming tasks. It covers topics such as data types, operators, Java methods, and basic programming concepts. Additionally, it includes practical applications like calculating discounts and equivalent resistance using Java programming.

Uploaded by

itrf.2681
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

RESONANCE

Subject: COMPUTER APPLICATION


Class-IX
F.M-80 Time-
2hr
MOB: 9038297568/ 8274905486

A. Multiple Choice Questions : [1×20=20]


1. Which of the following is non-primitive data?
a) Char b) long c) object d) short
2. Boolean data is used to test a particular condition i. e true or false. which of the
following is correct representation?
a) Boolean m=true b) Boolean m=’true’ c) Boolean m=”true” d) none
3. C++ is a high level language also known as : a) OOP b) POP c) SOP d) HLL
4. The type of java programs: a) Java applets b) java.io c) java.util d) java.math
5. Which of the following is the valid comment? a) /*comment*// b) //*comment*//
c) /comment d) //comment
6. The ASCII Code for ‘g’ : a) 102 b) 103 c) 71 d) 72
7. “\n” represents : a) NULL b) New line feed c) carriage return d) form feed
8. ‘*’ is a : a) string literals b)character literals c) Boolean literals d) Real
Literals
9. Char c=’A’; int n=c+1; char ch=(char)n; the o/p of ch: a) B b) a c) 66 d) 98
10. If a=12, b=8 find the value of a*=++a/6+b++%3; a) 42 b) 48 c) 46 d) 50
11. The statement n+=4 is equivalent to: a) ++n b) n=n+4 c) n+1 d) none
12. What will be the output of a++ when int a=-1; a) 1 b) -1 c) 0 d) none
13. Math.ceil( 7.8) output is: a) 8.0 b) 8 c) 7.0 d) 7
14. double x=2.9,y=2.5;
System.out.println(Math.min(Math.floor(x),y)); a) 3.0 b)2.0 c) 4.0 d) 5.0
15. What type of value is return by Math.sqrt() ? a) int b) float c) double d) all
16. Give the output of the Math.abs(X); X=-9.99 a) -9.99 b) 9.99 c) 0.99 d) None
17. If a,b and c are the sides of a triangle then which of the following statement is true
for: if (a!=b && a!=c && b!=c)? a) isosceles triangle b) Scalene Triangle c)
Equilateral triangle d) all
18. Which of the following is conditional statement? a) if b) goto c) for d) none
19. A java program executes but doesn’t give the desired output. It is due to: a) logical
error b) syntax error c) run time error d) none
20. Condition is essentially formed by using: a) Arithmetic Operator b) Relational
Operator c) Logical Operator d) ALL of the above
B. Assertion and Reason Based Questions:
[5×2=10]
(a) Both assertion(A) and Reason (R) are true and Reason(R) is correct
explanation of Assertion(A)
(b) Both assertion(A) and Reason (R) are true and Reason(R) is not correct
explanation of Assertion(A)
(c) Assertion(A) is true but Reason (R) is false
(d) Assertion(A) is false but Reason (R) is true

1. Assertion(A): The break statement is used at the end of each case and is referred
to as case terminator. However, you can write statement even after break for any
specific case.
Reason(R): It forces the control to exit the switch block.
2. Assertion(A): Math.ceil( ) returns the lower integer number that is less than or
equal to the argument.
Reason(R): It always returns the value as a double data type.
3. Assertion(A): Operators are special signs or symbols used to perform operations in
java programming.
Reason(R): They are considered as tokens.
4. Assertion(A): While assigning a float data value to a variable, you must use letter
‘F’ or ‘f’ as suffix along with value.
Reason(R): It will assist the compiler to know the data type that you are going to
use in the program
5. Assertion(A): A class is used to create similar objects that possess different
characteristics and common behavior.
Reason(R): Class is an object factory.

C. Java Expression:
[5×2=10]
4 π
1. a−1 + 3 ab
2. √5 4 +133
4 3
3. πr
3
ab+bc +ca
4. Z=
3 abc
2 2
a +b
5. f= 2 2
a −b

D. Give the output of the snippet?

1. double a=-6.35;
double b=14.74;
double x= Math.abs(Math.ceil(a));
double y=Math.rint(Math.max(a,b)); the value of x and y ?
[3]

2. double m= Math.cbrt(9.261);
int p= Math.abs (Math.max(-91,-97)); the value of m and p ?
[3]
3. If a= 48, b=13; find the value of a+ = b++ *5/a++ +b;
[2]
4. Rewrite using Ternary Operators:
[2]
if((a+b)>c)
{
k=15;
System.out.println(k);
}
if((a+b)<c)
{
k=30;
System.out.println(k);
}

E. A cloth showroom has announced festival discounts and gifts on the purchase of
items, based on the total cost as given below:

Total Cost Discount Gift


Upto Rs. 2000 5% Calculator

Rs. 2001 to Rs. 5000 10% School Bag

Rs. 5001 to Rs. 10000 15% Wall clock

Above Rs. 10000 20% Wrist Watch

Write a java program to input the total cost. compute and display the amount to be paid by the
customer along with the gift. [15]

F. The equivalent Resistance of series and parallel connections of two resistances is given by the
formula:
r1 × r2
(A) R1= r1+r2 (Series) (B) R2= (Parallel)
r 1+r
2

Using switch case statement, write a program to enter the value of r 1 and r2.
Calculate and display the equivalent resistance accordingly.
[15]
**** All The
Best ****

You might also like