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 |
Explain the use of bit fieild.
what is the full form of c language
write the program for prime numbers?
73 Answers Accenture, Aptech, Infosys, TCS,
can you change name of main()?how?
Describe the steps to insert data into a singly linked list.
How can I read and write comma-delimited text?
Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays
What are the applications of c language?
What is the difference between i++ and i+1 ?(in terms of memory)
What is the difference between ‘g’ and “g” in C?
inline function is there in c language?
Define a structure to store roll no, name and marks of a student. Using the structure of above write a ‘C’ program to create a file “student.dat”. There must be one record for every student in the file. Accept the data from the user.