a) No
b) Yes
c) Yes, but not a very efficient way to write programs
d) No, it gives a runtime error
1 thought on “Can two functions declare variables(non static) with the same name?”
Leave a Comment
You must be logged in to post a comment.
a) No
b) Yes
c) Yes, but not a very efficient way to write programs
d) No, it gives a runtime error
You must be logged in to post a comment.
c
Explanation: We can declare variables with the same name in two functions because their scope lies within the function.