Arya Vidyamandir Computer Prelim
Arya Vidyamandir Computer Prelim
SECTION A
Attempt all questions from this section
Question 1
Choose the correct answer and write the correct option
(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.
(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
(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
Question 2 [20]
7. Write the prototype of a function search which takes two arguments a string and a character and returns an
integer value.
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:
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.