10 Computer Application Mock Test

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

M. C. KEJRIWAL F.

M 100

V I D Y A P E E T H TIME 2 Hrs.

MOCK TEST 2023 – 2024


SUBJECT: COMPUTER APPLICATION
CLASS: X

Answers to this Paper must be written on the paper provided


separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed
for writing the answers.

This Paper is divided into two sections.


Attempt all questions from Section A and any four questions
from Section B.
The intended marks for questions or parts of questions are
given in brackets [ ].

SECTION – A
(Attempt all questions from this Section)

Question 1 Choose the correct answer [20]

i. Name the feature of java depicted in the above picture.


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

ii. The memory capacity (storage size) of short and float data type in bytes.
a. 2 and 4 b. 1 and 4 c. 1 and 2 d. 2 and 8

iii. What will be the value of a after execution of following expression: int a=8, b=2, c=1;
a%=b+c++ +b+c;
a. 9 b. 1 c. 8 d.5

iv. Identify OOPS concept is being featured in following real life example:
When a subordinate showed a diligent performance, the boss shared some of his authorities
with him.
a. Encapsulation b. Polymorphism c.inheritance d. Abstraction
v. Name a keyword to allocate a memory to an object.
a. dot b. new c. this d. allocate

vi. Identify the invalid Identifier


a. document b. $_document c. documet123 d. d$_1

vii. 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

viii) Identify the error:


Trying to store a value which is incompatible to a certain datatype.
Eg: int a=sc.nextInt(); // entered value 'a'
a. Logical b. Runtime c. Syntax d. No Error

ix) Arrange the operators in descending order: %, ++, &&, <=


a. ++,%,<=,&& b. ++,%,&&,<= c. %,++,&&,<= d. %,++,<=,&&

x) What will be output for the following:


Math.pow(25, I/2)+Math.sqrt(Math.min(4,9));
a. 3 b. 3.0 c. 7 d. 7.0

xi) Which of the following are primitive data types?


a. Double b. String c. char d. Integer

xii. Predict the Output for the following snippet:


int i;
for (i=1; i<=3; i++)
System.out.print(i++);
a. 4 b. 123 c. 13 d.5

xiii) Mention the return type of Math.random()


a. double b. int c. float d. depends in the argument passed.

xiv. Once a function is defined it can be invoked repeatedly. Name this feature of java.
a. Interface b. reusabi1ity c. robust d. Platform independent

xv) What value will be stored in variable val:


val=Math.round(-8.5);
a. -9.0 b. -9 c. -8 d. -8

xvi. What will be the output of the following code segment:


int y=5, x;
for (x=10; x<= 15; x++)
y--;
System.out.print((x+y)+" ,");
a. 20, b. 15, c. 16, d. 15, 14, 13, 12,11,10

xvii) Identify the Logical And Operator:


a. & b. == c. && d. =

xviii) Identify the single line comment in java:


a. \\ b. /* */ c. // d. /

xix. which method of scanner class is used to accept a word from the String entered:
a. nextline() b. next() c. nextLine() d. wordextract()
xx. Find the output of the following code
int m= 49;
switch(m+ 1)
{
default: System .out.println( Math . pow ( 5.2));
case 49: System.ont .println(Math.sqrt(m));
break;
}
a. 25.0 b. 25.0 c. expression m+1 cannot he written. d. default should be always at the end.
7.0

Question 2:
i. Find the output for the following: [2]
a. System.out.println("WELCOME"+20+20);
b. System.out.println(`e'+20+"20");
ii. Name the type of conversion in statement 1 and statement 2: [2]
char ch=’C’;
System.out.println((ch+1)); // statement 1
System.out.println((char)(ch+1)) ;// statement 2
iii. Name the following: [2]
a. The keyword which converts variable into constant.
b. The method which terminates the entire program from any stage.
iv. Rewrite the following program segment using logical operators: [2]
if ( x > 5 )
if ( x > y ))
System.out.println (x+y);
v. What will be the output when the following code segment is executed? [2]
char ch=’C’;
System.out.println((ch+ 1 )-+ " "+ ++ch);
vi. Write the difference between Math.ceil() and Math.floor(). [2]
vii. Convert the following for loop into do while loop: [2]
for (i = 10 ; ; i = i – 3)
{
if (i==4)
break;
System. out. print(i);
}
viii. Give the output of following code and mention how many times the loop will execute? [2]
int i=5;
while (i-- >=1)
{
if (i%2 ==1)
continue;
System.out.print(i+" ");
}
ix. Identify and name the following tokens: [2]
a. public b) 'a' c) = = d) { }
x. Answer the following as instructed: [2]
2
a. Write a Java expression for the following: |x + 2xy |
b. What will be the output:
System.out.println("\"I\" am the \n\Topper\””);

SECTION B (60 Marks)


(Answer any four questions from this Section.)
The answers in this section should consist of the programs in either BlueJ environment or any
program environment with java as the base.
Each program should be written using variable description / mnemonic codes so that the logic of
the program
is clearly depicted.
Flowcharts and algorithms are not required.

Question 3: [15]
Each Program should be written using variable description / mnemonic codes.
Define a class employee having the following description:
Data members/instance variables:
int pan — to store personal account number
String name — to store name
double tax income — to store annual taxable income
double tax — to store tax that is calculated
Member functions:
input() — Store the pan number, name, taxable income
calc() — Calculate tax for an employee
display() — Output details of an employee
Write a program to compute the tax according to the given conditions and display the output as
per given format.

Total annual Taxable Income Tax Rate


Upto Rs. 1,00,000 No tax
From 1,00,001 to 1,50,000 10% of the income exceeding Rs. 1,00,000
From 1,50,001 to 2,50,000 Rs. 5,000 + 20% of the income exceeding Rs. 1,50,000
Above Rs. 2,50,000 Rs. 25,000 + 30% of the income exceeding Rs. 2,50,00

output:

Question 4: [15]
Write a menu driven java program to perform the following task according to user’s choice.
Accept the values
as and when required:
a. Print the following series: 0,7,26, 63..... N terms.
b. Print the sum of the following series: 1/1-2/4+3/9-4/16....n terms
c. Print the sum of the following series: x2 + x4 + x6 + x8 …. n terms.

Question 5: [15]
Write a java program to check whether the entered number is a tech number or not.
A tech number has even number of digits. If the number is split in two equal halves, then the
square of sum of these halves is equal to the number itself. Write a program to generate and print
all four digits tech numbers.
Example:
Consider the number 3025
Square of sum of the halves of 3025 = (30 + 25)2
= (55)2
= 3025 is a tech number.

Question 6: [15]
Write a program to computerize the billing operation of a telephone of a telephone company. The
bill has to be generated based on the following conditions:
Number of calls Amount per call
First 50 calls free
Next 100 calls 50 Paisa per call
Next 200 calls 80 Paisa per call
Rest of the calls Rs 1.20 per call
A rent of Rs 120 is charged from every customer. A tax of 15% is charged on the sum of charges
and rent. The total amount is tax added to the sum of charges and rent .Print the bill for a
customer.

Question 7: [15]
(i) Write a program in java to print the Mersenne Numbers (i.e., the numbers in the form 2n − 1).
Read a limit from user and print all numbers until it exceeds the given limit. Also mention
which(nth) number has exceeded the limit.
(ii) Write a Java Program that reads a string and tests whether it begins with an uppercase letter
or not

Question 8: [15]
Write a menu driven java program to perform the following task according to user’s choice.
1. Check whether a number is a palindrome number
A palindrome number is a number that is the same after the reverse.
2. Print Tribonacci series:
0, 1, 1, 2, 4, 7, 13…n terms.

-----------------------

You might also like