MCQ
What happens when we declare a variable inside other block of program as same name as declared inside in main () method?
  • There will be conflict with both variables and error will be displayed.
  • B
    Textbox for changing name will be displayed.
  • C
    Variable will be created.
  • D
    None of these

Answer

Correct option: A.
There will be conflict with both variables and error will be displayed.
There will be conflict with both variables and error will be displayed.

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