Can two functions declare variables(non static) with the same name.
A. No
B. Yes
C. Yes, but not a very efficient way to write programs.
D. No, it gives a runtime error.
Answer:A
Can two functions declare variables(non static) with the same name.
A. No B. Yes C. Yes, but not a very efficient way to write programs. D. No, it gives a runtime error.
Explanation:We can declare variables with the same name in two functions because their scope lies within the function. 7. What is the output of this program?