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 use of null pointer in c?
What is use of bit field?
What are void pointers in c?
What is difference between structure and union in c programming?
What happens if a header file is included twice?
In C programming, what command or code can be used to determine if a number of odd or even?
What are the types of arrays in c?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
How to implement a packet in C
What is use of pointer?
What is declaration and definition in c?
how we can make 3d venturing graphics on outer interface
Can we replace the struct function in tree syntax with a union?
Explain why can’t constant values be used to define an array’s initial size?
What is the meaning of typedef struct in c?