Important Practice Questions for ICSE [Set 1]
Important practice questions for ICSE Computer Application students [Multiple Choice Questions and Output Questions)
Section A
Answer the below questions by choosing any one of the four given options:
1. Java Virtual Machine (JVM) is an:
(a) Interpreter (b) Compiler (c) Machine Code (d) Byte Code
2. Which of the following is non-primitive data type:
(a) char (b) long (c) String (d) short
3. The statement n++ is equivalent to:
(a) ++n (b) n=n+1 (c) n+1 (d) none
4. The java compiler translates java source programs to:
(a) Machine Language (b) Bytecode (c) System Language (d) Native Code
5. The size of “int” data type is:
(a) 8 bits (b) 16 bits (c) 32 bits (d) 64 bits
6. What is the return type of a constructor?
(a) void (b) Boolean (c) int (d) None of the above
7. What is the result produced after the following statements are executed:
int a = 2,b, c; a = a+4; b = 3*a; c = a-b; System.out.println(2+c+c);
(a) 2cc (b) -22 (c) 200 (d) 22
8. a[16] is the _________ element of the array declared as char a[20];
(a) 16th (b) 15th (c) 17th (d) None of the above
9. The access specifier, return type and function signature together is known as: Function ________
(a) Prototype (b) Signature (c) Definition (d) Call
10. The default delimiter in Scanner class is:
(a) Tab character (b) Blank Character (c) All of the above (d) None of the above
11. With respect to the input "This is a cat", what will be the values in 'x' and 'y' after the execution of the following statements: String x = sc.next(); String y = sc.nextLine();
(a) x=This , y=is (b) x=This , y=is a cat (c) x=This is a , y=cat (d) None of the above
12. What is the return type of the following method: x.equals(y)
(a) yes or no (b) right or wrong (c) All of the above (d) None of the above
13. Two Arithmetic expressions can be joined with if statement, using:
(a) Logical operator (b) Null operator (c) Arithmetic operator (d) Ternary operator
14. Which of the following is not a keyword?
(a) false (b) void (c) while (d) main
15. Which of the following statement is an invalid array declaration?
(a) int [ ][ ]n; (b) int n[ ]; (c) int n[4]; (d) int n[ ][ ];
16. More than one java statements together is called a block/compound statements. They are enclosed in:
(a) Parenthesis (b) Braces (c) Square brackets (d) /* and */
17. An array is created as follows: Boolean b[]=new Boolean[10]; How many bits will be used for the array?
(a) 1 (b) 8 (c) 16 (d) 10
18. Character function which checks whether a character is a digit or not:
(a) isLetterOrDigit() (b) isDigit() (c) Both a and b (d) None of the above
19. A class is a ______________ data type.
(a) Primitive (b) Composite (c) user-defined (d) both b and c
20. The property of OOP which is implemented through the concept of function overloading
(a) Encapsulation (b) Abstraction (c) Polymorphism (d) Modularity
Section B
Given the following programming code: public boolean x(int a, int b) { boolean c = true; while(a>1 && b>1) { if(a>b) a-=b; else b-=a; } if(a ==1 || b == 1) c = false; return c; } (a) What will be the output of the above program code for, (i) x (28, 29) (ii) x (27, 39) (b) What is the above method calculating? (Answer should be in one line) [Note: Don't forget to share these resources and links from our website in your social networking sites with your friends and followers.]Leave a Reply
Your email address will not be published. Comments are reviewed before appearing publicly.