what is the difference between global variable & static
variable declared out side all the function in the file.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ashwinishaligram308
global variableis allocated on heap and static variables on
stack
Is This Answer Correct ? | 2 Yes | 11 No |
write a program to print infinte number
Why dont c comments nest?
Can you assign a different address to an array tag?
How can I determine whether a machines byte order is big-endian or little-endian?
What are the types of data files?
what is the disadvantage of using macros?
Is python a c language?
Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
Why is the code below functioning. According to me it MUST NOT.
The __________ attribute is used to announce variables based on definitions of columns in a table?