Author: Unknown
Subject: scope
Date: Saturday, 29 Feb 2020, 23:12:18
1. What is "(un)knowable outside" in the scope handout? Outside the file? ONE is knowable outside, but it's not known in the other file bar.c. 2. What does extern do to a variable? Why is E1 only accessible till the end of the block, though it is declared as extern? Doesn't extern make a variable accessible everywhere? If so, is it everywhere in the file or in the program? 3. What does static do to a variable? A static local variable has its value persist even after function has ended. But can it be accessed outside that function? For a static global, does static just mean it can only be accessed within the file?PREV INDEX NEXT