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...


What is the difference between a local and a global variable?

Answers were Sorted based on User's Feedback



What is the difference between a local and a global variable?..

Answer / rahul

Local Variables are declared within the function main.

main()
{
int a,b,c;(local variable declaration)

}
Global variables are declared outside the function main.

int FACT(int);
main()
{
Local variable declaration;
}

Is This Answer Correct ?    128 Yes 16 No

What is the difference between a local and a global variable?..

Answer / thiyagaraj.ramaswamy

Local Variable :
The scope or lifetime of the local variable
is with in a block or procedure..
Eg: DECLARE @Variable1

Global Variable :
The scope or lifetime of the global
variable throughout the execution of the program..
Eg: DECLARE @@Variable1

Is This Answer Correct ?    119 Yes 23 No

What is the difference between a local and a global variable?..

Answer / l.pandiyan

A global variable can be accessed by all functions. It is
initialized at the beginning of the program and is deleted
when the program shuts down. A local variable is isolated in
its function.

Is This Answer Correct ?    70 Yes 6 No

What is the difference between a local and a global variable?..

Answer / rattana

global variable can be accessed by all functions. local variable is isolated in its function.It is initialized at the beginning of the program and deleted when the program closed.

Is This Answer Correct ?    31 Yes 10 No

What is the difference between a local and a global variable?..

Answer / jaccessdenied

int a;//global variable
class VariablesDemo
{
int b;//class variable
void add()
{
int c,d;//c,d,e are local variables that are used within the function add
int e=c+d;
}
}

Is This Answer Correct ?    17 Yes 6 No

Post New Answer

More SQL Server Interview Questions

How to write a query with an inner join in ms sql server?

0 Answers  


how to write test cases for testing databases,especially for testing and writing test cases for stored procedures.any real time database testers.please answer me.

0 Answers  


Find columns used in stored procedure?

0 Answers  


Does view occupy space?

0 Answers  


How to create hyperlink from returned sql query ?

0 Answers   MCN Solutions,


How to use column default values in insert statements in ms sql server?

0 Answers  


What is a sql join?

0 Answers  


Explain the basic concepts of SQL server architecture?

2 Answers   College School Exams Tests,


How many index keys possible for a table

6 Answers  


Please tell me some knowledge about Clustering and how to add clustering?

1 Answers  


What is use of except clause? How it differs from not in clause?

0 Answers  


How do you make a trace?

0 Answers  


Categories