ICSE Computer Application - Class X - 2019 PYQ
Table of Content:
- Question 1:
(a) Name any two basic principles of Object-oriented Programming.
Answer
- Encapsulation
- Inheritance
(b) Write a difference between unary and binary operator.
(c) Name the keyword which:
- indicates that a method has no return type.
- makes the variable as a class variable
(d) Write the memory capacity (storage size) of short and float data type in bytes.
(e) Identify and name the following tokens:
- Question 2:
(a) Differentiate between if else if and switch-case statements
(b) Give the output of the following code:
String P = "20", Q ="19"; int a = Integer.parseInt(P); int b = Integer.valueOf(Q); System.out.println(a+""+b); (c) What are the various types of errors in Java?
(d) State the data type and value of res after the following is executed:
char ch = '9'; res= Character.isDigit(ch); (e) What is the difference between the linear search and the binary search technique?
- Question 3:
(a) Write a Java expression for the following:
\[ \lvert x^2 + 2xy \rvert \]
(b) Write the return data type of the following functions:
- startsWith()
- random()
(c) If the value of basic=1500, what will be the value of tax after the following statement is executed?
tax = basic > 1200 ? 200 :100; (d) Give the output of following code and mention how many times the loop will execute?
int i; for( i=5; i>=1; i--) { if(i%2 == 1) continue; System.out.print(i+" "); } (e) State a difference between call by value and call by reference.
(f) Give the output of the following:
Math.sqrt(Math.max(9,16))(g) Write the output for the following:
String s1 = "phoenix"; String s2 ="island"; System.out.println(s1.substring(0).concat(s2.substring(2))); System.out.println(s2.toUpperCase()); (h) Evaluate the following expression if the value of x=2, y=3 and z=1.
v=x + --z + y++ + y
(i) String x[] = {"Artificial intelligence", "IOT", "Machine learning", "Big data"};
Give the output of the following statements:
- System.out.println(x[3]);
- System.out.println(x.length);
(j) What is meant by a package? Give an example.
- Question 4:
(h) Evaluate the following expression if the value of x=2, y=3 and z=1.
v=x + --z + y++ + y
Related Questions
- Assignment 1: Design a class name ShowRoom with the following description:
- Assignment 2: Using the switch-case statement, write a menu driven program to do the following:
- Assignment 3: Write a program to input 15 integer elements in an array and sort them in ascending order using the bubble sort technique.
- Assignment 4: Design a class to overload a function series( ) as follows:
- Assignment 5: Write a program to input a sentence and convert it into uppercase and count and display the total number of words starting with a letter 'A'.
- Assignment 6: A tech number has even number of digits. If the number is split in two equal halves, then the square of sum of these halves is equal to the number itself. Write a program to generate and print all four digits tech numbers.