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

What is the datatype of rowid?

666


How to disable triggers using "disable trigger"?

779


What triggers long term care?

714


What are commonly used mssql functions in php?

713


How to use wildcard characters in like operations in ms sql server?

804






Explain differences between web edition and business edition?

115


Define compound operators?

677


What are the types of stored procedures in an sql server?

657


What is user-defined functions? What are the types of user-defined functions that can be created?

758


How many types of cursor type are there?

755


How many replicas are maintained for each sql azure db?

118


Do you think BCNF is better than 2NF & 3NF? Why?

997


Explain raiserror in sql server?

749


What is amo? : sql server analysis services, ssas

836


How do I view a trc file?

681