Code var data = "name";
data = 8;
Console.WriteLine(data); Options - output is 8
- its does not compile
Answer: Its does not compile(option 2). var keyword is implicit type, so once you are declared as a specific type, then it has decide the type automatically with right hand side value.so it won't compile. |