CL 10 - COMP APP - Practice Paper 5
CL 10 - COMP APP - Practice Paper 5
Practice Paper - 5
COMPUTER APPLICATIONS
Attempt all questions from Section A and any 4 questions from Section B.
The intended marks for questions or parts of questions are given in brackets.
SECTION A (40 Marks)
Attempt all questions
Question 1. [20]
(i) The process of combining data and functions that enables them to be together as a single
entity is called:
(a) inheritance (b) encapsulation (c) classification (d) attributes
(v) How many bytes a char data type occupies in the memory?
vii) Name the programming technique that implements programs as an organised collection of
interactive objects.
(a) Procedure Oriented Programming (b) Modular Programming
(c) Object Oriented Programming (d) None of the above
ix) Which among the following Scanner methods allows us to input a number with a decimal
point?
(a) nextInt() (b) nextFloat() (c) nextDecimal() (d) nextPoint()
Page 1 of 4
(xii) Information passed to a method through arguments is called _______.
(a) Message (b) Variables (c) Numbers d) Data
(xiv) If a function does not return any value, its return type should be:
(a) int (b) no-return (c) void (d) empty
(xv) For every object, separate memory is allocated to its __________ variables.
(a)Instance (b) Dynamic (c) Parameter (d) Static
(a)An object identifier (b) A method name (c) Arguments (d)Data members
(xix) State the total size in bytes of the array p[4] of float data type?
(a)16 (b) 8 (c) 32 (d) 14
Question 2. [20]
a)4/3r3 b)(a+b)n/2a
iii. What is the return type of the Math.round() function if the parameter is :
a. float data type
b. double data type
Page 2 of 4
a. double a = Math.ceil(17.3f);
b. System.out.println(“a=”+a);
vi. Find the errors in the given program segment and re-write the statements correctly to
assign values to an integer array.
Question 3 : [15]
Write a program to input 5 characters and find the sum of those characters which are digits.
Question 4 : [15]
Define a class Salary in Java with the following details:
Data members:
name[] array to store names of 20 employees
netsal[] array to store net salary of 20 employees
member methods:
void input() - to accept the names of 20 employees and their corresponding net salaries.
void selection() – to sort the array netsal in descending order and arrange the names
accordingly.
void print() – to print the sorted data in the array.
Question 5 : [15]
Page 3 of 4
Write a program to display the pattern:
1
22
333
4444
55555
Question 6 : [15]
Print the sum of the following series:
1 + 12 + 123 + 1234 + ……….(123…n)
Question 7 : [15]
Write a program which prints all the prime numbers up to a given number. Take the number
from the user.
Question 8 : [15]
Develop a java program that will help in computing the following:
16*1, 14*2, 12*3, 10*4, 8*5, 6*6, 4*7, 2*8
*********************
Page 4 of 4