Machine-translated by Google. Questions are authored in English.
Top

Discussion

The name of the variable used in one function cannot be used in another function?

  • A.True
  • B.False
  • C.May be
  • D.None of the mentioned.

Answer: B

Correct answer: False

Each function has its own scope, so the same identifier may be used in as many functions as one likes and each denotes a distinct object. That independence is the point of block scope, and it is what allows a loop counter called i to appear throughout a program without conflict.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.