Sail E0 Webinar
Question

Can two functions declare variables(non static) with the same name.


Options:
A .  No
B .  Yes
C .  Yes, but not a very efficient way to write programs.
D .  No, it gives a runtime error.
Answer: Option C

We can declare variables with the same name in two functions because their scope lies within the 

function.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers