🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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)?

  1. A.The function keeps its local variables between calls
  2. B.The function can be called only from code in the same .c file
  3. C.The function runs once only
  4. 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 →