Summer Assignments Class X
Summer Assignments Class X
SUMMER ASSIGNMENT
COMPUTER APPLICATIONS (PAPER I)
CLASS: X
.
Q3. Rewrite the following loop using for loop :
while (true)
System.out.println(“*”);
(a) 5 digits
(b) 7 digits
(c) 15 digits
(d) 10 digits
(a) float
(b) int
(c) void
(d) null
a) 3
(b) 0
(c) 2
(d) 1
Q14. Among the following Statements, Which are true about Constructors?
Q18. The process of converting wrapper class object to primitive data type is called :
(a) Boxing
(b) Unboxing
(c) Conversion
(d) Post Boxing
Q19. What is the proper access specifier for data members of a class?
(a) Private
(b) Default
(c) Protected
(d) Public
.
Q20. ___________ keword is used while creating a static method.
(a) Static
(b) Final
(c) Instance
(d) Nostat
(a) 20218
(b) 2029
(c) Error
(d) 2030
Q24. How can string be created by two methods ?
Q26. In the program given below, state the name and the value of the:
(i) method argument or argument variable.
(ii) class variable.
(iii) local variable.
(iv) instance variable
class myClass.
{
static int x = 7;
int y = 2;
public static void main(String args[])
{
myClass obj = new myClass();
System.out.println(x);
obj.sampleMethod(5);
int a = 6;
System.out.println(a);
}
void sampleMethod(int n)
{
System.out.println(n);
System.out.println(y);
}
}
(a) 6
(b) 7
(c) 8
(d) 9
Q28. The algorithm in which the middle index is found and the array is divided into 2 halves to search
for an element is called :
Q31. State the total size in bytes, of the arrays a[4] of char data type and p[4] of float data type.
.
Q32.
Q34. Define a class to accept a string and convert the same to uppercase, create and display the new
string by replacing each vowel by immediate next character and every consonant by the previous
character. The other characters remain the same.
Example:
Input : #IMAGINATION@2024
Output : #JLBFJMBSJPM@2024
Q35. Consider the following program segment and answer the questions given below:
int x[][] = { {2,4,5,6}, {5,7,8,1}, {34, 1, 10, 9}};
(a) What is the position of 34?
(b) What is the result of x[2][3] + x[1][2]?