Friday , 28 July 2017
Home » Weekly Practice Question Class 10 » [Week 1] Weekly Practice Questions for ICSE and ISC students

[Week 1] Weekly Practice Questions for ICSE and ISC students

This week we have a list of 5 Multiple Choice Questions (MCQ), which you can use to test your knowledge on JAVA.

These are helpful practice questions which will help the students of ICSE (Class 9-10) and ISC (Class 11-12) in their preparation for their Computer Application and Computer Science Exams respectively. [To know more about these weekly practice questions, Click Here]

You need to select any one of the four given options, and reply it as comments by filling the “Leave a Reply” section below this post.

The correct answers will be posted before next Sunday.

1. The Java compiler translates Java programs to intermediate level language called:

(a) Machine Language
(b) Byte Code
(c) System Language
(d) Native Executable Code

2. double c , x = 5, y=10;
int z=51;
c = x * y + z/2.5;
What is the value now stored in c?

(a) 70
(b) 40.4
(c) 70.4
(d) 152

3. Java Virtual Machine (JVM) is a:

(a) Interpreter
(b) Compiler
(c) Machine Code
(d) Byte Code

4. If a function returns a value, the return type of the function will not be:

(a) int
(b) float
(c) void
(d) None of the above

5. Which of the following can be used when you know the number of times we have to perform any given task:

(a) for loop
(b) while loop
(c) do-while loop
(d) All of the above

The Correct answers are marked in blue color.

Explanations:

1. A program written in Java (the source code) is first passed through a Java Compiler. The Java compiler then translates the Java program to intermediate level language called Byte Codes which are then interpreted by a special Java Interpreter called Java Virtual Machine (JVM). The JVM then translates each instruction of byte code into instructions that the computer in use can execute i.e. Machine Code.

Remember this is how Java Compilation works:

Java Program (Source Code)  Java Compiler  Intermediate Code (Byte Code)  Byte Code Interpreter (JVM)   Machine Code

2. The execution is as follows:

c = x * y + z/2.5;
c = 5 * 10 + 51/2.5;
c = 50 + 20.4;
c = 70.4;

3. Read explanation to question 1.

4. If a function does not return any value, then it must have ‘void’ return before it’s name. And if it returns a value, then the data-type of the value being returned is written before it’s name.

Hence, if a function returns a value, the return type of the function cannot be void.

5. For loop, While loop and do-while loop can all be used when know the number of times we have to perform any given task.

Check Also

Important Practice Questions for ICSE [Set 1]

Important practice questions for ICSE Computer Application students [Multiple Choice Questions and Output Questions)

22 comments

  1. 1- byte code
    2- 70.4
    3-interpreter
    4-void
    5- all of the above

  2. 1.bytecode
    2.70.4
    3.interpreter
    4.void
    5.all of the above

  3. 1. machine language 2. 70 3. Compiler 4. Void 5. For loop

  4. 1.byte code
    2.70.4
    3.Compiler
    4.Integer
    5.for-loop

  5. 1.(B)
    2.(C)
    3.(A)
    4.(C)
    5.(D)

  6. 1.b
    2.c
    3.a
    4.c
    5.d

  7. 1.b
    2.b
    3.a
    4.c
    5.a

  8. 1)a
    2)c
    3)a
    4)c
    5)d

  9. 1.(a)
    2.(a)
    3.(a)
    4.(c)
    5.(d)

  10. 1.(b)
    2.(c)
    3.(a)
    4.(c)
    5.(d)

  11. 1.(a)
    2.(a)
    3.(a)
    4.(c)
    5.(d)

  12. 1)b
    2)b
    3)d
    4)c
    5)a

Leave a Reply

Your email address will not be published. Required fields are marked *