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
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
What is the use of pragma in embedded c?
What are the differences between Structures and Arrays?
What is storage class?
What are file streams?
What are pointers? What are different types of pointers?
Write a program to use switch statement.
Do you have any idea about the use of "auto" keyword?
c language interview questions & answer
What does c in a circle mean?
Write a program to print "hello world" without using a semicolon?
How is actual parameter different from the formal parameter?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
write a c program to find the sum of five entered numbers using an array named number