Computer Science - Class 12
Solutions to CBSE Sample Paper - Computer Science Class 12

Which of the following statement(s) would give an error after executing the following code?

S="Welcome to class XII"    # Statement 1

print(S)                    # Statement 2

S="Thank you"               # Statement 3

S[0]= '@'                   # Statement 4

S=S+"Thank you"             # Statement 5

(a) Statement 3

(b) Statement 4

(c) Statement 5

(d) Statement 4 and 5



Question 9 Statement 4 gives -Teachoo.png

Statement 4 gives an error.

So, the correct answer is (b).

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.