Home / CSE MCQs / C-MCQs :: Discussion

Discussion :: C-MCQs

  1. A variable declared in a function can be used in main?
  2. A.
    True
    B.
    False
    C.
    True if it is declared static
    D.
    None of the mentioned.

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Since the scope of the variable declared within a function is restricted only within that function,
    the above statement is false.


Be The First To Comment