Q. f() x

  • (A) error
  • (B) 4
  • (C) junk value
  • (D) 1
πŸ’¬ Discuss
βœ… Correct Answer: (D) 1
Explanation: in the code shown above, when we call the function f, a new namespace is created. the assignment x=4 is performed in the local namespace and does not affect the global namespace. hence the output is 1.

Explanation by: Mr. Dubey
in the code shown above, when we call the function f, a new namespace is created. the assignment x=4 is performed in the local namespace and does not affect the global namespace. hence the output is 1.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
539
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate