Guess Paper – 2008
Class – X
Subject – Computer Applications
Time 2 Hrs.
This paper is divided into two sections Section A and Section B.
Section A is compulsory. Attempt all questions from it.
Answer any FOUR questions from Section B. The intended marks for each question is given in braces []
Section A –40marks
(Attempt all questions)
Q1. a. What is a compound statement? Give an example.
b. State the difference between constructor and method.
c. What do you understand by reference data type?
d. What do you understand by main method?
e. Name the three access specifiers.
Q2. a) Rewrite the following using relational operator. 5.
int flag =0;
for (i=2;i<n;i++)
{
if (n%i ==0)
flag =1;
}
if flag = 1
String s = “Prime”;
b) Fill in the blanks :- 5
public static void search(int !1!., int n, int v)
{
int j,flag,p
for ( !2!)
{
if (a[j] = =v)
!4.!
!5!
}
if (flag = =1)
System.out.print(“position “+p)
}
Q3. a) Give output 4.
public static void main ( )
{ int i , r ;
for ( i = 1 ; i <= 5 ; i ++ )
{ r = tot ( i ) ;
System.out.println(” The total is = “+ r) ; }}
Public static int tot ( int x )
{ int s = 0;
s + = x ;
return (s);}
b) Which element is num[5] of the array num ? 2
c) Explain working of following operator with example 4.
i) >>> ii) Bitwise xor
Q4. a) Difference between indexOf and lastIndexOF() function ? 2
b) What do you understand by function signature ? 2
c) if x = 5 then find the value of 3x2 = 6
i) x<< 2, b) x’ c) y = ( x%2 ==0)? 1: 0
SECTION-B [60 Marks]
Q 6) Create class Sortsearch where the data members and methods are as follows:-
Instance variables : int arr[10] , no
Methods:
void accept() : Accept 10 numbers from the user.
void sort() : Sort the numbers in ascending order either
using bubble sort logic or selection sort
logic .(Mention the name of the logic)
Q 7) Class MyArray contains the employee code of 100 employees. Some of the member function/ data members are given below:
Class name : MyArray
Data member : arr[] – integer
Member Function:
MyArray() - to assign the code to 0.
void fillarray() - to input the code in the arr[]
void sortArr() - to sort the array variable using selection sort technique.
int binarySearch(int code) - to search and return 1 if an employee code is found in the array object else return 0.
Write the class details. You do not need to write the main function.
Q8). Using function prime wap to print the twin primes between a range
Class name twin
Constructor twin()
Data members upper, lower.
Member functions checkprime() //checks whether a number is prime or not
Twinprime() // displays twin prime between the upper and lower range. Program should have main method and use object to call the member functions. [15]
Q9). Wap to check whether a matrix is symmetric or not. A symmetric matrix is exactly same with its transpose. Use main method.
Q10). Write a program to accept any sentence and reverse each word of the sentence.
Input there are five boys
Output ereht era evif syob.
Q11). A class Text is designed to handle text related operations. Some functions of class Text are as follows:
Class : Text
Data Member : txt – to store the given string. (maximum length – 80)
Member Function
Text() : constructor
void readText() : reads the given string from the input
char charAt(int i) : returns the character at position i of the string
int length() : returns the length of the string
int noOf Words() : returns the number of words in the text
int noOfWhiteSpace() : returns the total number of white spaces in the text
Download ICSE Computer Applications Guess Paper Class X - 2008 (2)
- CIC-1 : The Context-December,2006
(509 downloads)