MCQ
What happens when we declare a variable with the same name as of the variable in scope?
  • There will be an error.
  • B
    Another variable will be created with the same name.
  • C
    Another variable will be created with the different name.
  • D
    None of these

Answer

Correct option: A.
There will be an error.
There will be an error.

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free