Answers of Class 10 ICSE COMPUTER APPLICATIONS SEMESTER 1 EXAMINATION 2021 | Study Table

 ICSE SEMESTER 1 EXAMINATION

SPECIMEN QUESTION PAPER

COMPUTER APPLICATIONS

________________________________________________________________________________

Maximum Marks: 50

Time allowed: One hour (inclusive of reading time)

ALL QUESTIONS ARE COMPULSORY.

The marks intended for questions are given in brackets [ ].

________________________________________________________________________________

Select the correct option for each of the following questions. ________________________________________________________________________________

SECTION A (30 Marks)

Question 1

Choose the correct answer [5×1]

(a) Which of the following are valid comments?

(i) /* comment */

(ii) /* comment

(iii) // comment

(iv) */ comment */

1. (i) & (iii)

2. (i) & (ii)

3. All of the above

4. None of the above

Ans : (1)

___________________________________________________________

(b) Operators with higher precedence are evaluated before operators with relatively lower

precedence. Arrange the operators given below in order of higher precedence to lower

precedence.

(i) && (ii) % (iii) >= (iv) ++

1. (iv), (i), (iii), (ii)

2. (iv), (iii), (ii), (i)

3. (iv), (ii), (iii), (i)

4. (i), (ii), (iii), (iv)

Ans : (3)

___________________________________________________________

 (c) Which of the following keyword is used to create an instance of a class?

1. new

2. public

3. class

4. None of the above

Ans : (1)

___________________________________________________________

(d) What is the final value stored in variable x ?

 double a =-8.35;

 double x = Math.abs(Math.floor(a));

1. 9.0

2. 7.0

3. 6

4. 7

Ans : (1)

___________________________________________________________

(e) Name the type of error in the statement given below:

int r=100/0;

1. Syntax

2. Runtime

3. Logical

4. None of the above

Ans : (3)

___________________________________________________________

Question 2

Fill in the blanks with the correct option [5×1]

(a) The ______(1)______ allows a class to use the properties and methods of another class.

1. Inheritance

2. Polymorphism

3. Encapsulation

4. None of the above

(b) The number of bytes occupied by char data type is _____(3)_____byte/s

1. 4

2. 8

3. 2

4. None 

(c) The _____(1)____ is called an instance of a class

1. Object

2. Attributes

3. State

4. None

(d) The ______(1)______ are the words which have special meaning

1. Keywords

2. Identifier

3. Methods

4. Package

(e) Method that accepts a string without any space is ____(1)___

1. next()

2. nextLine()

3. nextInt()

4. None of the above

Question 3

Name the following [5×1]

(a) The keyword to make a variable as a class variable

1. static

2. Static

3. final

Ans : (1)

___________________________________________________________

(b) Intermediate code obtained after compilation

1. Source code

2. Byte Code

3. Object code

Ans : (2)

___________________________________________________________

(c) The method with the same name as of the class and which does not have a return data

type is called as

1. Constructor

2. Function

3. Method

Ans : (1)

___________________________________________________________

(d) The statement to stop the execution of a construct.

1. System.exit(0)

2. break

3. STOP

Ans : (2)

___________________________________________________________

(e) Invoking a method by passing the objects of a class is termed as

1. Call by value

2. call by reference

3. call by method

Ans : (2)

___________________________________________________________

Question 4

State True Or False [5×1]

(a) byte is a non - primitive data type

1. True

2. False

Ans : (2)

___________________________________________________________

(b) !(2>3&&4>6 )

1. True

2. False

Ans : (1)

___________________________________________________________

(c) Scope of local variable is within a class.

1. True

2. False

Ans : (1)

___________________________________________________________

(d) The default statement is optional in switch- case.

 1. True

2. False

Ans : (1)

___________________________________________________________

(e) The assignment operator(=) is left associative.

1. True

2. False

Ans : (1)

___________________________________________________________

Question 5

Choose the odd one [5×1]

(a) 1. Encapsulation

2. Data abstraction

3. Portable

4. Polymorphism

Ans : (3)

___________________________________________________________

(b) 1. >

2. ==

3. &&

4. <

Ans : (3)

___________________________________________________________

(c) 1. return

2. break

3. continue

4. System.exit(0)

Ans : (4)

___________________________________________________________

(d) 1. int

2. double

3. char

4. String

Ans : (4)

___________________________________________________________

(e) 1. +

2. %

3. /

4. ||

Ans : (4)

___________________________________________________________

Question 6

Give the output of the following [5 × 1]

(a) x + = x++ + ++ x + --x + x; [ x = 5 ]

1. 29

2. 28

3. 26

Ans : (1)

___________________________________________________________

(b) if ( a > b )

 System.out.println(a+b);

 System.out.println (a*b); when a = 5 and b = 7

1. 12, 35

2. 35

3. 35, 12

Ans : (2)

___________________________________________________________ 

(c) String x = (a >= 90) ? "excellent" : "best"; when a = 90

1. best

2. excellent

3. excellentbest

Ans : (2)

___________________________________________________________

(d) switch ( x )

{ case 'a' : System.out.println("Discipline");

 case 'b' : System.out.println ("Dedication"); break;

 case 'c' : System.out.println("Commitment");

 default : System.out.println("Success");

 } when x='A'

1. Discipline

2. Dedication

3. Success

Ans : (3)

___________________________________________________________

(e) n=1000;

while (n>10)

 { n=n/10;

 }

 System.out.println(n); How many time the loop is executed and what is the output?

1. Loop is executed 2 times and the output is 100

2. Loop is executed 3 times and the output is 10

3. Loop is executed 2 times and the output is 10.

Ans : (3)

___________________________________________________________

SECTION B (20 Marks)

Question 7

Given below is a class with the following specifications:

Class name : overload

Member Methods:

void print ( int n ) – to print the first ‘n’ natural numbers

boolean print (int m, int n) – to check whether n is a multiple of m or not

Fill in the blanks of the given program with appropriate java statements –

class (a)____________

{

void print (int n)

{

int k;

for ( (b)_______; (c)_________; (d)____________)

{

System.out.println(k);

}

}

boolean print( int m, (e)________)

{

if ( (f)_________________)

return true;

else

return false;

}

}

(a) 1. OVERLOAD

2. overload

3. class 

Ans : (2)

___________________________________________________________

(b) 1. k = 1;

2. k = n;

3. k = 0 

Ans : (1)

___________________________________________________________

(c) 1. k<=n;

2. k>=n;

3. k+n; 

Ans : (1)

___________________________________________________________

(d) 1. k+=2

2. k+=5

3. k++ 

Ans : (3)

___________________________________________________________

(e) 1. int n

2. double n

3. char n

Ans : (1)

___________________________________________________________

(f) 1. if (n%m == 0)

2. if (m%n==0)

3. if (m/n==0) 

Ans : (2)

___________________________________________________________

Question 8 :

The following program is based on the specification given below. Fill in the blanks with

appropriate java statements.

class name : telephone

member variables : int noc [ number of calls]

 double bill [ telephone bill to be paid ]

 String n [ name of the customer ]

Member methods :

void input ( ) – to accept the data using the scanner class

void print() – to print the details

void calculate () – to calculate the telephone bill as per the following criteria based on

number

 of calls

 Number of calls Rate per call

 First 100 calls free

 Above 100 callsRs.2.50

void main ( ) – to create an object of the class and invoke the functions of the class

class (a)_____________

{ int noc; double bill ; String n;

 Scanner ob = (b)______________ Scanner(System.in);

 void input( )

 { System.out.println(“Enter Number of calls”);

noc = (c)____________________;

 System.out.println(“Enter name “);

 n=ob.next();

 }

 void calculate()

 { if ( (d)__________________)

 bill =0;

 else

 bill = (e)_____________________________;

 }

 void print()

 { System.out.println(“Name = “+n);

 System.out.println(“Amount to be paid=”+bill);

 }

 void main ()

 { telephone t = new telephone();

 t.input();

 (f)______________________;

 t.print();

 }

 }

(a) 1. telephone

2. class

3. object 

Ans : (1)

___________________________________________________________

(b) 1. old

2. new

3. void 

Ans : (2)

___________________________________________________________

(c) 1. ob.nextDouble()

2. ob.nextLine()

3. ob.nextInt()

Ans : (3)

___________________________________________________________ 

(d) 1. noc<100

2. noc < = 100

3. noc > 100

Ans : (2)

___________________________________________________________

(e) 1. bill=0+(noc-100)*2.50

2. bill = (noc-100)*3.50

3. bill = noc*2.50 

Ans : (1)

___________________________________________________________

(f) 1. t.input()

2. t.calculate()

3. t.print() 

Ans : (2)

___________________________________________________________

Question 9

The following program segment calculates the norm of a number, norm of a number is square

root of sum of squares of all digits of the number.

Example:

The norm of 68 is 10

6×6 + 8×8 = 36+64 = 100 square root of 100 is 10.

Fill in the blanks with appropriate java statements.

void norm ( int n)

{ int d, s =(a)______;

while ( (b)_________)

{ d = n%10;

s = (c)________________;

n=n/10;

}

System.out.println(“Norm = “ + (d)_____________);

}

(a) 1.  0

2.  0.0

3. 1 

Ans : (1)

___________________________________________________________

(b) 1. n>0

2. n<0

3. n>1 

Ans : (1)

___________________________________________________________

(c) 1. s+d*d

2. s*d+d

3. s*s+d

Ans : (1)

___________________________________________________________

(d) 1. Math.sqrt(s)

2. Math.SQRT(s)

3. Math.sqrt(n) 

Ans : (1)

___________________________________________________________

Question 10

Read the paragraph given below and answer the questions given below:

Case study 1

Decision control statements are used to check for condition and execute the statements based

on the condition. The two decision control statements in java are if and switch, switch is also

called as multiple branching statement. An if statement within another if statement is termed

as Nested if Statement. Repetitive execution of a set of statements is termed as looping. The

two types of looping statements are entry controlled and exit controlled loops. Both while and

for are termed as entry-controlled loops. A for loop is used when the number of iterations is

known. A while is used when the set of statements are executed as long as the condition is true,

it is executed when the number of iterations are not known.

(a) What are the two decision control statements in java? [1]

1. if and switch

2. for and while

3. ternary and logical 

Ans : (1)

___________________________________________________________

(b) An if statement within another if statement is termed as [1]

1. Nested

2. Nested while

3. Nested if

Ans : (3)

___________________________________________________________

(c) Name given for repetitive execution of set of statements. [1]

1. Looping

2. Decision Control

3. Assignment

Ans : (1)

___________________________________________________________

(d) Which one of the following does not execute even once? [1]

1. for(k = 1; k<=100;k++);

2. for(k=10;k<1;k++);

3. for(k=1;k>=1;k++);

Ans : (2)

___________________________________________________________

I hope you would have enjoyed this post of mine.

For more  codes and videos visit my Youtube channel :

 https://youtube.com/channel/UC27TQ7zJKapHF78bwvi5iVw

For more Posts based on Language visit my Blog: http://studytable10.blogspot.com/

Also, join my telegram:https://t.me/studytable10

     Thanks!!           


            

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


 

Comments

Popular posts from this blog

You have accidentally left your suitcase behind when you got off the train. You only realized it after the train left the platform. Write a letter to the station master reporting your loss and request that the suitcase is located and kept till you claim it.

You went to an ATM to withdraw some money but the machine did not dispense cash. However, the amount got debited from your account. Write a letter to the manager of a bank, complaining about the deduction of money from your Savings Bank Account, while you did not receive the cash from the ATM, which you used to withdraw the money | Study Table

Shorthand Assignments Program for Java