+2 votes
in Class 12 by kratos

Predict the output of the following code snippet:

ptr=50

def result():

global ptr

ptr=ptr+1

print ptr result()

print ptr

1 Answer

+3 votes
by kratos
 
Best answer

The output is

51

51

...