engineering computer science MCQ #2117

What does `static int x;` imply?

engineering computer science MCQ #2117

  1. Question 1

    Q1. What does `static int x;` imply?

    • A) x is a global variable
    • B) x retains its value between function calls
    • C) x is a constant
    • D) x is not accessible outside the file

    Answer: x retains its value between function calls

    Explanation: Static variables retain their values between function calls, initialized only once. NET computer science MCQs often test this core concept.