๐Ÿ“ข Too many exams? Donโ€™t know which one suits you best? Book Your Free Expert ๐Ÿ‘‰ call Now!

  • google app store apple app store
  • โœ–

      Question

      What is the scope of a variable declared inside a block

      of code (e.g., within curly braces)?
      A It can be accessed from anywhere within the same file. Correct Answer Incorrect Answer
      B It can only be accessed within the same block of code. Correct Answer Incorrect Answer
      C It can be accessed from any function within the same file. Correct Answer Incorrect Answer
      D It can only be accessed from functions declared after the block. Correct Answer Incorrect Answer

      Solution

      It can only be accessed within the same block of code.

      Practice Next

      Relevant for Exams:

      ask-question