class Program
{
void add()
{
int x=10, y=20;
fun();
Console.WriteLine("{0}", sum);
}
void fun()
{
int sum;
sum = x + y;
}
static void Main(string[] args)
{
Program f =new Program();
f.add();
}
}
Debug above program.....
Answer Posted / nvk
The Variable Sum Is Not defined
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What are the properties of string?
What is an ienumerable in c#?
Explain the use of virtual, sealed, override, and abstract method?
What are the commonly used i/o classes?
Why delegates are type safe?
What is scope c#?
Explain the difference between abstract class and interface.
i want o/p 011242110 in c# code.
List some of the classes used by system.data namespace?
Explain how can I get around scope problems in a try/catch?
how background thread access to ui control?
How does dictionary work in c#?
What is code verification?
What is sqladapter c#?
What are the 2 types of data types available in c#?