0% found this document useful (0 votes)
98 views3 pages

Class 10 Computer Applications Mock Test

Uploaded by

Krishna Kanodia
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)
98 views3 pages

Class 10 Computer Applications Mock Test

Uploaded by

Krishna Kanodia
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/ 3

http://www.icseguess.

com/

MOCK TEST – 9
COMPUTER APPLICATION
CLASS – X
F.M= 100 [ 10 MINTS READING TIME ] TIME : 1 H 50 MINTS

[ Section – A ]
Q1. Find the output with tabular form :--
a. Class Example{ [5]
int calc( int a, int b ){ int c ; c=(++a) *b; c=c++*4; return c ; }
void test ( ){ int a=5, b=6 ; int n= calc(a, b ) ; System.out.println(“n=” + n );
int r= ++n + a++ +++b +a- - ; System.out.println(“a=”+a + “b=”+b + “r=”+r + “n=”+n ); }}
b. void display( ) { int [ ]a= { 1,6,3,4,0.12,2,5 }; int l= a.length ;
for ( int i=0 ; i < l ; i++ ) { switch (i){ case 0 : a[i]=a[i+1]; case 2 : a[i]=a[i+2]; case 6 : a[i++]=a[i]; break ;
case 7 : a[i]=a[i-1]; default : a[i]=a[i+1] ; }}
for ( int i=0 ; i < l ; i++ ) { System.out.println( a[ i] );} [5]

Q2. a . What is a manipulative function ? Give an example .


b . What are the tools that BlueJ included ?
c . Explain the operator precedence .
d . What is difference between SCOPE and Access Specifier of the variable ?
e . Write the two precondition of binary search ? [ 2 x 5 = 10 ]

Q3 . a. if desti is ‘O’ and salary = 15000, then find the output ? desti == ‘o’ ?( salary >= 13000 ? ‘A’ : ‘B’ ) : ‘C’ .
b . Arrange the data type according the descending order of size . short , byte , char , float .
c . Using while loop printout the integer 3, 2, 1, 0, -1 .
d . What is the difference between binary , unary , and ternary operator ?Give example
e . What are the difference between Bubble sort and selection sort ?
f. Given the array 24, 4, 19, 6 . Show the state of array 3 passes of Bubble sort technique . [ 1+ 1 + 2 + 2 +2 +2 = 10 ]

Q4. a . What is the difference between capacity() and length() with example ?
b . Name in one word :
i . Keyword used to avoid name space collision of local and instance variable .
ii. It is the other name of the member function of a class .
iii . These are the names given by the programmer in a program for variable, functions, classes etc .
iv . An object which is automatically created and connected to the keyboard .
c . What is the difference between charAt( I ) and indexOf (i) ?
d . Find the output :--
public static void main( String args[]){
String s= “2 XY 42 XY PACKAGE XY JAVA”;
Scanner sc=new Scanner ( s ) . useDelimeter (\\*XY\\s*);
System.out.println(“the tokens are”);
System.out.println(sc.nextInt()); System.out.println(sc.nextInt());
System.out.println(sc.next()); System.out.println(sc.next());}
e . What is the difference between String and StringBuffer class ? [ 2 + ( 0.5 x 4 ) + 2 + 2+2 = 10 ]

[ Section – B ] [ Any four ][ variable listing and comment line mandatory ]

www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com |
www.iitguess.com
http://www.icseguess.com/

[ 15 x 4 =60 ]
Q5 . Write a program to accept a list of n integers and find the integer with highest number of occurrences. You may assume
that only one integer has maximum frequency in the list . print the value along with its frequency .
12 ,45, 14 , 6, 88, 34 , 14 , 88, 14, 99, 3, 14, 21, 389, 12, 14, 14, 76, 54, 23
Integer having max frequency 14 , number of occurrences is 6 .

Q6 . Write a program to arrange the letters of string in alphabetically order and print the new string . Any character that is
not a part of the alphabet are added at the end of the new string . E.g : if the input is “@Computer Application 2013”,
then the output is “aAcCeiilmnooppprttu@ 2013. [ Note that there is 2 spaces after @ in output string ]

Q7. An angle may be measured in degree and minutes. E.g : √A= 70 degree 35 mints and √B= 50 degree 40 mints
Now to find the sum of two angles :
√C= √A+√B= 121 degree 15 mints [ 1 degree = 60 mints ]
Write a program in java to specify a class Angle to model an angle. Design a function sumAngle() to find the sum of
angle Prototype : Angle sumAngle( Angle, Angle ).

In main method ask the user to input the values of two of them. Use constructors to initialize the data item . Call the function
sumAngle() and assign the sum to the third angle. Show the value of third angle .

Q8. Write a program to check whether a student is eligible for taking admission in a special course.
Class name : Student
Instance variable :
String name to store name
int mathmarks to store maths marks
int scimarks to store science marks
int compmarks to store Computer marks
boolean eligible to store whether a student is eligible for a course
Methods :
public Student( ) Default Constructor
public Student( String, int , int ) Initialize name and three marks
public float retAvg( ) Calculate the average marks and return it
public boolean checkEli( ) Check the condition for eligible for course .
The eligible conditions are :---
1. The student must get more than 95 % marks in computer or
2. The student avg marks will be more than 88% and his / her science marks will be more than 90 % or
3. Students avg marks will be more than 75 % but his/ her science marks will be more than 85 %

Q9. Design a class overloading the function display( ) as follows :


a. void display( String s , boolean flag ) : if flag is true then print the word s in all capital letter otherwise print in
lower case
b. void display( String s , char ch ) : display the 1 st half portion of the word s if ch=’t’ else display the last half portion
of the word. This word must consists of even number of characters .
is s= “good” and ch= ‘t’ output = “go” otherwise output “od”
c. void call accept the required input and call the functions .

Q10 . Write a menu driven program to do the following job :

www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com |
www.iitguess.com
http://www.icseguess.com/

Job 1 : Display sum of the series :


1, 9, 49, 225, 961, ……………………….. n terms
Job 2 : To diplay the pattarn
54321
43215
32154
21543
15432.

Paper Submitted By:

Name: Tridib Singha


Email: [email protected]
Phone No. 08017308636

www.icseguess.com
Other Educational Portals
www.cbseguess.com | www.ignouguess.com | www.aipmtguess.com | www.aieee.com | www.niosguess.com |
www.iitguess.com

You might also like