Which of the following correctly assigns animal to both variables?
A.
Option A (I) correctly assigns the value to both variables.
II does not compile as dog does not have a type.
Notice the semicolon in that line, which starts a new statement.
III compiles but only assigns the value to dog since a declaration only assigns to one variable rather than everything in the declaration.
IV does not compile because the type should only be specified once per declaration.