0% found this document useful (0 votes)
3 views

computer 2

The document is a question paper for Computer Applications for STD X at Ryan International School, Nashik. It includes multiple choice questions, short answer questions, and programming tasks related to Java programming concepts. The questions cover topics such as data types, arrays, methods, searching algorithms, and sorting techniques.

Uploaded by

Milaap Barhate
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

computer 2

The document is a question paper for Computer Applications for STD X at Ryan International School, Nashik. It includes multiple choice questions, short answer questions, and programming tasks related to Java programming concepts. The questions cover topics such as data types, arrays, methods, searching algorithms, and sorting techniques.

Uploaded by

Milaap Barhate
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Ryan International School, Nashik

STD X COMPUTER APPLICATIONS:


Q 1 Multiple Choice Questions [10]
1. Number of primitive data types in Java are?
a. 6 b. 7 c. 8 d. 9
2. What is the size of float and double in java?
a. 32 and 64
b. 32 and 3
c. 64 and 64
d. 64 and 32
3. Automatic type conversion is possible in which of the possible cases?
a. Int to long
b. Long to int
c. Short to int

4.Find the output of the following code.


public class Solution{
public static void main(String[] args){
byte x = 127;
x++;
x++;
System.out.print(x);
}
}
a. -127
b. 127
c. 129
d. 2
5. Select the valid statement.

a. char[] ch = new char(5)


b. char[] ch = new char[5]
c. char[] ch = new char()
d. char[] ch = new char[]
6. Find the output of the following program.

public class Solution{


public static void main(String[] args){
int[] x = {120, 200, 016};
for(int i = 0; i < x.length; i++){
System.out.print(x[i] + “ “);
}
}
}
a. 120 200 016
b. 120 200 14

c. 120 200 16

d. None

7. When an array is passed to a method, what does the method receive?

a. The reference of the array


b. A copy of the array
c. Length of the array
d. Copy of first element
8. Select the valid statement to declare and initialize an array.

a. int[] A = {}
b. int[] A = {1, 2, 3}
c. int[] A = (1, 2, 3)
d. int[][] A = {1,2,3}

9. Find the value of A[1] after execution of the following program.


int[] A = {0,2,4,1,3};
for(int i = 0; i < a.length; i++){
a[i] = a[(a[i] + 3) % a.length];
}
a. 0 b. 1 c. 2 d. 3
10. Arrays in java are-
a. Object references
b. objects
c. Primitive datatype
d. None

Q 2. (Any 5 ) [10]
1. What would be the output
If a=5,b=3. The value of c would be
a. int c=a+b*7/2
b. float c=a-b/2*9/4
2. What are methods and types of methods in java
3. if int p=5, q=4;
What is the value of r
1. r=p+q++ + q--;
2. r=p/q + --q /q++;
4. Write a difference between Linear searching and Binary Searching
5. Write the difference between searching and sorting.
6.. Write a java statement for each to perform the following task:
(i) Find and display the position of the last space in a string str.
7. Extract the second character of the string str.
SECTION B ( Any 1 ) 10 Marks

Q 3 . Write a program for following


1. Define a class to declare an integer array of size n and accept the elements into
the array. Sort the array in ascending order , using Bubble sorting technique .
2. Write a program to accept names of 20 students , in array names[].Accept a
character. Display all names starting with the character entered.
Example
Enter a character A
Output : Ashana
Amar
Anita

You might also like