1)

Select error in the given program:

Static Void Main(String[] args)
{
const int m = 200;
int n = 20;
const int k = n / 10 * 100 * n ;
Console.WriteLine(m * k);
Console.ReadLine();
}


A) ‘k’ should not be declared constant

B) Expression assigned to ‘k’ should be a constant

C) Expression (m * k) is invalid

D) ‘n‘ is declared in invalid format

Answer:

Option B

Explanation:

’k’ should be declared as const int k = 20/10 * 100*10 i.e only constant values should be assigned to a constant.