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 factorial of given number without using recursion?
What are the advantages and disadvantages of c language?
Explain the binary height balanced tree?
Explain how do you override a defined macro?
Differentiate between functions getch() and getche().
void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case
void main() { for(; 0 ;) ... { printf("hello"); ... } getch(); }
what are the advantage and disadvantage of recursion
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
write a program to print the one dimensional array.
what is c language?
Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)