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

Computer Application Review Test 2024-25

Uploaded by

lily27896
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)
92 views4 pages

Computer Application Review Test 2024-25

Uploaded by

lily27896
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

Ashoka Groups of School

Ashoka Universal School


Academic Session 2024-2025
Review Test
Time: 1hrs Subject: Computer Application Marks: 50mks
Topics Covered:Concept of OOPs, Features of java, Classes and Object, Values and Data type,
Operators, Input in java.
Question 1:
Choose the correct answer and write the correct option: [20]
i) Find the output of the following code.

public class Solution{


public static void main(){
int x = 6;
x /= 5 + 7;
[Link] (x);}
a) 0.5 b) 0 c) 8.2 d) 8

ii) Identify OOPs concept is being featured in following image as real life example:

a) Encapsulation b) Polymorphism c) Inheritance d) Abstraction

iii) Identify the invalid Identifier


a) d ocument b) $_document c) documet123 d) d&_1

vi) Name the primitive data type in Java that is: A 64-bit integer and is used when you
need a range of values wider than those provided by int.
a) int b) double c) long d) float

v) Identify the error:


Trying to store a value which is incompatible to a certain datatype.
Eg: int a=[Link](); // entered value ‘a’
a) Logical b) Runtime c) Syntax d)No Error

vi) Assertion (A): In java constants are also called literals


Reason(R): literals are constant that represents the value assigned to memory variable in java.

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

2024-25/ Review Test I/Computer Application Page 1 of 4


vii) Assertion(A): != = is a valid operator in java to represent not equal to.
Reason(R): It is a Relational Operator and returns true when two value are not same.
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 false and Reason (R) is true
d) Assertion (A) is true and Reason (R) is false

viii) Identify the correct comment in java:


a) // b) \\ c) \* *\ d)/*/*

ix) Assertion(A): The function that takes whole number input is nextInt()
Reason(R): Other functions nextShort(),nextByte(),nextLong() can also input whole numbers as datatype used to
store values without decimal are int, short, byte long.
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

x) Choose the odd one out –


a) Polymorphism
b) Encapsulation
c) Inheritance
d) Compilation

xi) The concept of abstraction is


a) Binding data and function together
b) Reusing of the code
c) Hiding inner complexities and providing usable interface
d) Making variables as constant
xii) The number of bytes occupied by the constant ‘A’ are:
a) one byte b) two bytes c) four bytes d) eight bytes

xiii) Byte can hold all value between


a) -127 to 126 b) -127 to 127 c) -128 to 127 d) -128 to 126
xiv) What would be the output of following code.
char x=’Z’; int m;
m=(x==91)?’Z’:’z’;
[Link](“m=”+m);
a) m=91 b) m=z c) m=122 d) m=Z

xv) Once a function is defined it can be invoked repeatedly. Name this feature of java.
a) Interface b) Reusability c) Platform independent d) Robust

xvi) Which package is included by default:


a) [Link] b) [Link] c) [Link] d) [Link]

xvii) Escape sequence for horizontal tab is :


a) \n b) \tab c) \r d) \t
xviii) Which kind of method does not require object to be invoked?
a) instance method b)static method c) both a and b d)None of the above
xix) Method that accepts a string with space is _____.
a) next( ) b) nextInt( ) c) Next() d) nextLine( )

2024-25/ Review Test I/Computer Application Page 2 of 4


xx) Which of the following is the correct equivalent java expression for |a2 +b2|
a) [Link](a*a+b*b) b) [Link](a+b) c) [Link](a*a+b*b) d) [Link](a+b)

Question 2:

i) Find the output for the following: [2]


WELCOME2024
a) [Link]("WELCOME"+20+24);
b) [Link](‘b’+20+"24"); 11824

ii) Name the type of conversion: [2]


a) float m=65.6f;
char ch =(byte)m; Explicit Conversion
b) float a=’1’+’2’; Implicit Conversion

iii) What value will be store in ch and a in above question [Link]) a) ch=65 [2]
b) a=99
iv) Answer the following as instructed:
a) Write a java expression for the following. [1]
s  a b c [Link](a-b)+c;
b) What will be the output : [1]
[Link]("\"I\" am the \n\'Topper\'"); "I" am the
'Topper'
v) Identify the error in each: [4]
Syntax a) Missing of method/function b) division by zero Runtime
Syntaxc) float a=2.5; d) double c=3/100*4; Logical

vi) Find the value of a,b, and c for the given expression: [4]
int a=4, b=2, c=3;
a) c+=++a-b-- +a%b; c=c+(++a-b--+a%b);c=3+(5-2+5%1); c=6
b) a/= -b + ++c*c; a=a/(-b+ ++c*c);a=4/(-2+4*4);a=0;

vii) Find the output for the following: [2]


int a=9,b=3,c=5
a) (a>b)&&(a>c)||!(b<c) t&&t||!(t), output: true
b) !((a<b)||(a>c)&&(b>c) !(f)||t&&f, output:false

viii) Name the operator and its type: [4]


a) = Assignment/ b) != not equal to/ c)++ increment/ d) ?: Conditional
Binary Binary Unary Operator/
ix) Name the keyword/operator: Ternary[5]
a) to allocate the memory new b) to make a variable constant final
c) to include a package import d) to inherit the class extends
e) to access or call a method with help of an object dot

x) State the output if a=7 and b=3 [1]


[Link](a>b?a*b:a+b); output:21
xi) Name the following: [2]
a) interpreter used by java JVM

2024-25/ Review Test I/Computer Application Page 3 of 4


b) the programming technique that implements programs as an organised collection of interactive objects. OOPs

2024-25/ Review Test I/Computer Application Page 4 of 4

You might also like