Quiz Space

Programming Concepts using Java Quiz 1: 7 July 2024 (May 2024 term)

Question 1

+6 marksOne or more correct options

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

Select all that apply.

  1. A

    Return value link points to the start of the previous activation record.

  2. B

    An activation record is pushed into the stack when a function is called, and is popped out when the function returns.

  3. C

    The variables present in every activation record in the stack are in scope and are accessible.

  4. D

    The variables present in the topmost activation record of the stack are in scope and are accessible.

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 code given below.

java
public class Test{
public static void main(String[] args){
int a[] = {10, 20};
int x = a[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;
default:
System.out.println(x);
}
}
}
}

What will the output be?

  1. A

    20
    30
    30

  2. B

    20
    40

  3. C

    20
    40
    60

  4. D

    10
    20
    40

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 7 Jul 2024 paper

The IIT Madras BS Programming Concepts using Java (Java) Quiz 1 paper sat on 7 Jul 2024, in the May 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 7 Jul 2024 at a glance
TermMay 2024 term
SubjectProgramming Concepts using Java
Course codeBSCS2005
Questions15
Marks100
Duration120 min
MSQ1
MCQ14
Official paperIIT M DIPLOMA AN EXAM QDD2 7 July 2024
Negative markingNo negative marking.
Updated

Same Quiz 1, other subjects

More Java