What will be the error in the following C# code?
Posted: Wed Jul 13, 2022 7:56 pm
Static Void Main(String[] args) { const int m = 100; int n = 10; const int k = n / 5 * 100 * n ; Console.WriteLine(m * k); Console.ReadLine(); }
a) ‘k’ should not be declared constant
b) Expression assigned to ‘k’ should be constant in nature
c) Expression (m * k) is invalid
d) ‘m ‘ is declared in invalid format
a) ‘k’ should not be declared constant
b) Expression assigned to ‘k’ should be constant in nature
c) Expression (m * k) is invalid
d) ‘m ‘ is declared in invalid format