← Quiz: Storage Classes in C: all 15 questions
Quiz: Storage Classes in C · Question 13 of 15
What does static do when written before a function, as in static void helper(void)?
What does static do when written before a function, as in static void helper(void)?
- A.The function keeps its local variables between calls
- B.The function can be called only from code in the same .c file
- C.The function runs once only
- D.The function becomes faster
Answer & explanation
Correct answer: The function can be called only from code in the same .c file
On a function or a global, static gives internal linkage: the name is private to that file.
Can you get the rest right without peeking?
Take the timed Quiz: Storage Classes in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →