0% found this document useful (0 votes)
162 views7 pages

Arya Vidyamandir Computer Prelim

The document is a computer applications pre-preliminary exam for 10th standard students. It contains two sections - Section A with 40 marks and Section B with 60 marks. Section A contains 20 multiple choice questions with one mark each. Section B contains 4 questions with 15 marks each, out of which students have to answer any 4. The questions are on topics like classes, methods, arrays, sorting, pattern printing etc. and involve writing Java code to solve problems.

Uploaded by

toliaanish123
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)
162 views7 pages

Arya Vidyamandir Computer Prelim

The document is a computer applications pre-preliminary exam for 10th standard students. It contains two sections - Section A with 40 marks and Section B with 60 marks. Section A contains 20 multiple choice questions with one mark each. Section B contains 4 questions with 15 marks each, out of which students have to answer any 4. The questions are on topics like classes, methods, arrays, sorting, pattern printing etc. and involve writing Java code to solve problems.

Uploaded by

toliaanish123
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
You are on page 1/ 7

1

Std X Computer App Preprelim Review December 2022

ARYA VIDYA MANDIR GROUP OF SCHOOLS


PREPRELIMINARY REVIEW - December 2022
COMPUTER APPLICATION

Std: X MARKS: 100


Date: 03.12.22 Time: 2Hrs

The paper is divided into two sections.


Answer all questions from section A and any 4 from section B.
Section A is of 40 marks and section B is of 60 marks.
Marks for each question is mentioned in [ ] to your right.
This paper consists of NINE printed pages

SECTION A
Attempt all questions from this section

Question 1
Choose the correct answer and write the correct option

(i) Which of the following is the correct statement to store 35 integers?


(a) int x[35] = new int[];
(b) int x[] = new int[35];
(c) int x[35] = new int[35];
(d) int x[] = new int[34];

(ii) Consider the following statement- private int x,y; Can the x and y be accessed from another class?
(a) Yes
(b) No
(c) May be
(d) if they accessed from protected class.

(iii) II operator has ____ precedence than && operator.


(a) lower
(b) higher
(c) equal
(d) None

(iv) How many constructors can a class have?


(a) 0
(b) 1
(c) 2
(d) Any number
2
Std X Computer App Preprelim Review December 2022

(v) What is the output:


System .out.print("NAMASTEY" .compare To("Namaste") );
(a) false
(b) true
(c) 32
(d)-32

(vi) What will be the output for the following code:


int a=10, b=15;
while(++a < - -b)
System .out.print(b );
System.out.print(a);
(a) 131314
(b) 141413
(c) 141313
(d) 141312

(vii) Corresponding wrapper class of char data type is __


(a) Char
(b) Character
(c) CHAR
(d) CHARACTER

(viii) A data type which contains occupies 32 integer as well as fractional part and occupies 32 bits space is_
(a) double
(b) int
(c) float
(d) byte

(ix) State the output of the following:


for(int i=1, j=1, i<=2, i++);
System.out.print(I + ” ” + “**”)
(a)1 1**2 1**
(b)1 1 **2 2**
(c)2 2**1 1**
(d)1 2**2 3**

(x) Static variables are also called


(a) Local variables
(b) Class variables
(c) Final variables
(d) Instance variables
3
Std X Computer App Preprelim Review December 2022

(xi) A class implements which of the following OOP characteristics?


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

(xii) · State the output of the following :


double x=-3.142; ·
int y=(int) Math.abs(x) +(int)x;
System.out.print(y);
(a)O
(b)6.284
(c)6.0
(d)-6

(xiii) State the output of the following :


System.out.print("Save electricity and water".indexOf('b') + 1 );
(a)3
(b)0
(c)1
(d)-1

(xiv) What is the return type of the method endsWith()?


(a)Int
(b)Char
(c)Boolean
(d)String

(xv) Practical implementation of polymorphism in java is


(a)method overloading
(b)method calling
(c)method prototype
(d)method signature

(xvi) ___ searching is faster when the arrays are very lengthy
(a)Linear
(b)Bubble
(c)Binary
(d)Selection
4
Std X Computer App Preprelim Review December 2022

(xvii) How many boolean literals are there in java?


(a)0
(b)1
(c)2
(d)3

(xviii) How many boolean literals are there in java?


a) parselnteger()
b) toString()
c) parselnt()
d) tolnt()

(xix) The arguments used in the calling ·method are called?


a) Actual parameters
b) Formal.parameters
c) Virtual parameters
d) Real parameters

(xx) The array char P[]={'a','b'}; occupies


a) 2 bytes
b) 4 bytes
c) 8 bytes
d) 6 bytes

Question 2 [20]

1. What is the value of y after evaluating the expression given below?


y+= ++y + y-- + --y; when int y=8

2. Write the output for the following:


int y=0;
for(int x=3;x<=5;x++)
{ y=x*x;
if(y>=12)
continue;
System .out. println(y );
}

3. Differentiate Pure and Impure function.

4. Name the keyword that:


i) The access specifier used with a class member so that this class member can be used in the
Inherited/subclass.
ii) distinguishes between instance variables and class variables
5. Consider the following class:
public classmyClass{
public static int x=3,y=4;
5
Std X Computer App Preprelim Review December 2022

public int a=2, b=3; }


i) Name the variable for which each object of the class that-will have its own distinct copy.
ii) Name the variables that are common to all objects within the class

6. Rewrite the following do while loop using for loop:


int i=1;
int d=5;
do
{
d=d*2;
System.out.println( d);
i++;
}
while (i<=5);

7. Write the prototype of a function search which takes two arguments a string and a character and returns an
integer value.

8. What is the output of the following:


i)System. out. println("Java is programming language \n developed by \t\'James Gosling\"');
ii) System.out.printlri(" Health and Happiness!".trim().substring(0,5));

9. What is Autoboxing and Unboxing? Give examples of each.

10. What do you mean by literal and Identifier?

SECTION B
(Answer any four questions from this Section.)

Question 3 [15]
A private Cab service company provides service within the city at the following rates:

AC CAR NON AC CAR


UPTO 5 KM Rs 150/- Rs 120/-
BEYOND 5 KM Rs 10/- PER KM Rs 08/- PER KM
Design a Class CabService with the following description: _
Member variables /data members:
• String car_type - To store the type of car (AC or NON AC)
• double km - To store the kilometer travelled
• double bill - To calculate and store the bill amount
Member methods:
• CabService() - Default constructor to initialize data members. String data members to 11 11 and double data
members to 0.0.
• void accept() - To accept car_type and km (using Scanner class only).
• void calculate () - To calculate the bill as per the rules given above.
• void display() - To display the bill as per the following format
CAR TYPE:
KILOMETER TRAVELLED:
TOTAL BILL:
Create an object of the class in the main method and invoke the member methods.
6
Std X Computer App Preprelim Review December 2022

Question 4 [15]
Define a dass to declare a character array of size ten to accept the characters into the array using scanner class ·and
display the characters with high.est and lowest ASCII value.
Example :
Input : {'R' 'Z' 'q' 'A' 'N' 'p' 'm' 'U' 'Q' 'F'}
Output : Character with highest ASCII value is =z.
Character with lowest ASCII value is = A,

Question 5 [15]
Design a class to overload a method Number( ) as follows:
void Number (int num , int d) - To count and display the frequency of a digit in anumber
Example:
num = 2565685
d=5
Frequency of digit 5 = 3 digit in a number.
void Number (int n1) - To find and display the sum of even digits of a number.
Example:
n1 = 29865
Sum of even digits = 16
void Number() - To display the following pattern:
1
22
333
4444
55555

Question 6 [15]
Write a program that stores a list of countries and the % of people owning P.C. as below:
Country %people owning P.C.
India 78.2
Japan 36.7
USA 89.7
Germany 42.3
Singapore 47.8
U.K 37.8

Use the above data and using bubble sort technique print the list in the descending order of its % people
owning P.C

.
Question 7 [15]
Write a program to accept a word and convert it into lower case, if it is in upper case. Display the new
word by replacing only the vowels with the letter following it.
Sample Input: computer
Sample Output: cpmpvtfr
7
Std X Computer App Preprelim Review December 2022

Question 8 [15]

Write a program to accept names and corresponding telephone numbers two diff.arrays. Accept in the
name of a person and display telephone no the corresponding using binary search.

You might also like