Which of the below statements are correct about the following code?
public class A
public static void Main(string args)
string str = null;
Code will not compile.
Code will compile and run.
Code will compile but gives exception at run time.
str pointing the null reference here, then NullReferenceException will get at runtime but in the compile time never gets error.
Back To Top