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 advantage of software development
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
Explain the red-black trees?
What is bubble sort in c?
In C programming, what command or code can be used to determine if a number of odd or even?
what different between c and c++
By using C language input a date into it and if it is right?
What are the types of arrays in c?
what is pointer
what is the output of the following program? main() { int c[]={2,8,3,4,4,6,7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf("%d",*c); ++q; } for(j=0;j<5;j++) { printf("%d",*p); ++p; } }
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......