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 |
How do i store a paragraph into a string? for example, if i input a long paragraph, the program will read the words one by one and concatenate them until no word is left.
Is c easy to learn?
how do you programme Carrier Sense Multiple Access
what is the maximum no. of bytes calloc can allocate
Method Overloading exist in c ?
Can you please explain the difference between syntax vs logical error?
What is return in c programming?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
What is meant by operator precedence?
Tell us the use of fflush() function in c language?
a simple program in c language
How the processor registers can be used in C ?