Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How more than one version of an assembly can keep in same place?

925


Is array value type in c#?

969


Okay, so an int is a value type, and a class is a reference type. How can int be derived from object?

903


What is the relation between classes and objects?

916


What is difference between ienumerable and iqueryable in c#?

889


What is the use of main method in c#?

930


How many types of constructors are there in c#?

914


Why do I get a syntax error when trying to declare a variable called checked?

958


What is int parse in c#?

922


Can we customize the serialization process?

920


What are methods in C#?

917


Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).

871


Difference between Value type & reference types ? and give the example in .Net?

887


How can it prevents DLL Hell assembly versioning in .NET?

983


How many types of polymorphism are there?

893