Quiz Space

Java Quiz 1: 29 October 2023 (September 2023 term)

Question 1

+6 marksOne or more correct options

Which of the following is/are CORRECT about heap?
Choose the correct option(s).

Select all that apply.

  1. A

    Heap is used to store dynamically allocated data.

  2. B

    Activation records created for functions are allocated in heap.

  3. C

    Heap storage needs to be explicitly requested by the programmer.

  4. D

    A heap storage allocation cannot be deallocated in any way.

Question 2

+6 marksOne correct option

Match the following terms with their descriptions/properties.

  1. A

    1-B, 2-A, 3-C, 4-D, 5-E

  2. B

    1-A, 2-B, 3-D, 4-E, 5-C

  3. C

    1-C, 2-D, 3-B, 4-E, 5-A

  4. D

    1-D, 2-C, 3-E, 4-A, 5-B

Question 3

+6 marksOne correct option

Consider the Java program below.

java
public class FClass{
public static void main(String[] args){
int a[] = {10, 20, 30};
int x = 0;
for(int i : a){
switch(i){
case 10:
x = x + 10;
System.out.println(x);
break;
case 20:
x = x + 20;
System.out.println(x);
break;
case 30:
x = x + 30;
System.out.println(x);
break;
default:
System.out.println(x);
}
}
}
}

What will the output be?

  1. A
  2. B
  3. C
  4. D

12 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Java Quiz 1 29 Oct 2023 paper

The IIT Madras BS Programming Concepts using Java (Java) Quiz 1 paper sat on 29 Oct 2023, in the September 2023 term: 15 questions for 100 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureJava Quiz 1 29 Oct 2023 at a glance
TermSeptember 2023 term
SubjectProgramming Concepts using Java
Course codeBSCS2005
Questions15
Marks100
Duration120 min
MSQ2
MCQ13
Official paperIIT M DIPLOMA AN2 EXAM QPD2 29 Oct 2023
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More Java