what is the difference between global variable & static
variable declared out side all the function in the file.
Answer Posted / vishnu
Both the variables are stored in data segment but difference
is in accessing the variable. Global variables can be
accessed though out the project (if multiple files exists)
whereas static variable accessed within the file where its
declared.
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
What is the difference between array and pointer?
Explain what does the function toupper() do?
What is ambagious result in C? explain with an example.
What is the use of function in c?
What is c programing language?
How can I write functions that take a variable number of arguments?
Differentiate between declaring a variable and defining a variable?
Can the curly brackets { } be used to enclose a single line of code?
What is omp_num_threads?
Why is c fast?
By using C language input a date into it and if it is right?
What is a structure in c language. how to initialise a structure in c?
What are the functions to open and close the file in c language?
Explain what is the benefit of using an enum rather than a #define constant?
How do you construct an increment statement or decrement statement in C?