engineering computer science MCQ #2139

What does `static` mean for a variable inside a function?

engineering computer science MCQ #2139

  1. Question 1

    Q1. What does `static` mean for a variable inside a function?

    • A) It is initialized every time the function is called
    • B) It retains its value between function calls
    • C) It is a global variable
    • D) It is a constant

    Answer: It retains its value between function calls

    Explanation: Static variables inside functions retain their values between calls. NET computer science MCQs often test this core concept.