Select from following answers:- 50 10 50
- 50 10 10
- 10 10 10
- Compilation Error

- All Above
It will not compile actually,and say that Same variable cannot be declared more than once in C#.It will say that "A local variable named 'cnt' cannot be declared in this scope because it would give a different meaning to 'cnt', which is already used in a 'parent or current' scope to denote something else".
So to overcome this,we must declare different variables and store values.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator