Ask Question
28 July, 10:01

In class, we discussed static local variables in C. Answereach question below; if necessary, find and consult a reference on theC language (cite your source in your answer).

(a) For a non-static local variable in a C function, what is its scopeand what is its lifetime?

(b) For a static local variable in a C function, what is its scope andwhat is its lifetime?

(c) For a non-static global variable in C, what is its scope and whatis its lifetime?

(d) For a static global variable in C, what is its scope and what is itslifetime?

+3
Answers (1)
  1. 28 July, 13:51
    0
    (a) scope: function, lifetime: duration of the function

    (b) scope: function, lifetime: duration of the program

    (c) scope: global (all modules), lifetime: duration of the program

    (d) scope: module (file), lifetime: duration of the program
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In class, we discussed static local variables in C. Answereach question below; if necessary, find and consult a reference on theC language ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers