🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: References and Copying: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What does this print? (code)
  2. Q2. What does this print? (code)
  3. Q3. What does this print? (code)
  4. Q4. When should you use is instead of ==?
  5. Q5. Which of these types is mutable?
  6. Q6. A function does items = [] on its parameter. What does the caller's list look like afterwards?
  7. Q7. Why does grid = [[0] 3] 3 cause problems?
  8. Q8. Which call copies a nested list so that no inner list is shared?
  9. Q9. What does this print? (code)
  10. Q10. Which statement about a shallow copy of a list is true?