MCQs > IT & Programming > Python > What is the output of the following code? class A(object): def __init__(self): print 'Constructor A was called' class B(A): def __init__(self): print "Constructor B was called" class C(B): def __init__(self): super(C,self).__init__() print 'Constructor C was called' class D(C): def __init__(self): super(D,self).__init__() print 'Constructor D was called' d = D()

Python MCQs

What is the output of the following code? class A(object): def __init__(self): print "Constructor A was called" class B(A): def __init__(self): print "Constructor B was called" class C(B): def __init__(self): super(C,self).__init__() print "Constructor C was called" class D(C): def __init__(self): super(D,self).__init__() print "Constructor D was called" d = D()

Answer

Correct Answer: Constructor B was called Constructor C was called Constructor D was called

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it