Question OOP-CLS-0037
EasyWhat is the output of this code?
class P:
pass
p = P()
q = p
q.x = 10
print(p.x)
- A.
0
- B.
10
- C.
Error
- D.
None
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
What is the output of this code?
class P:
pass
p = P()
q = p
q.x = 10
print(p.x)
0
10
Error
None
Sign up free to see the answer and a step-by-step explanation.