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 |
What is the explanation for modular programming?
Suggesting that there can be 62 seconds in a minute?
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +
How do you determine if a string is a palindrome?
What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;
how does printf function work
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
wap in c to accept n number display the highest and lowest value
How will you allocate memory to double a pointer?
How to run c Program without using IDE of c. means if program made in notepad.then how to compile by command prompt.
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Is there a built-in function in C that can be used for sorting data?