CBSE Class 12 Computer Science Question 17 of 42

Solved 2024 Sample Question Paper CBSE Class 12 Computer Science (083) — Question 17

Back to all questions
17
Question

Question 17

Assertion(A): List is an immutable data type.

Reasoning(R): When an attempt is made to update the value of an immutable variable, the old variable is destroyed and a new variable is created by the same name in memory.

  1. Both A and R are true, and R is the correct explanation of A.
  2. Both A and R are true, and R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Assertion is false but Reason is true.

Reason — List is a mutable data type. When an attempt is made to update the value of an immutable variable, the old variable is destroyed and a new variable with the updated value is created, and the variable name is reassigned to point to this new object in memory.