Quiz Space

Java Quiz 1: 25 February 2024 (January 2024 term)

Question 1

+6 marksOne or more correct options

Which of the following statements is/are true about activation records?

Select all that apply.

  1. A

    All the variables on the stack (in any activation record) are said to be in scope.

  2. B

    The lifetime of a variable is the duration that it spends in the topmost activation record in the stack.

  3. C

    Every activation record has a control link that points to start of previous record.

  4. D

    Every activation record has a return value link that points to where to store return value.

Question 2

+6 marksOne or more correct options

Select all that apply.

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

Question 3

+6 marksOne correct option

Consider the code given below.

java
class Athlete {
public void perform() {
System.out.println("Athlete performs");
}
public void perform(String activity) {
System.out.println("Athlete performs " + activity);
}
}
class Gymnast extends Athlete {
public void perform(String move) {
System.out.println("Gymnast performs " + move);
}
}
public class TestAthlete {
public static void main(String[] args) {
Athlete a = new Gymnast(); // LINE 1
a.perform();
a.perform("backflip"); // LINE 2
}
}

Choose the correct option.

  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 25 Feb 2024 paper

The IIT Madras BS Programming Concepts using Java (Java) Quiz 1 paper sat on 25 Feb 2024, in the January 2024 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 25 Feb 2024 at a glance
TermJanuary 2024 term
SubjectProgramming Concepts using Java
Course codeBSCS2005
Questions15
Marks100
Duration120 min
MSQ2
MCQ13
Official paperIIT M DIPLOMA AN2 EXAM QDD2 25 Feb 2024
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More Java