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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know concepts and capabilities of sql server?

580


Is it possible to call a stored procedure within a stored procedure?

552


what is a deadlock? : Sql server database administration

493


What is extended stored procedures?

560


How many databases instances are there in sql server 2000?

575






What is difference between commit and rollback when used in transactions?

493


How to query multiple tables jointly?

554


how to define testing of network layers? : Sql server database administration

484


Where actually sql azure database is hosted?

149


What is merge replication?

710


Which language rdl files made of?

100


What is the use of custom fields in report?

556


Which is faster statement or preparedstatement?

526


What is log in sql server?

586


Any one plz send me SQL Server Developer/DBA resume for 4 years experience

2172