Solved

Consider the Class Below

Question 39

Multiple Choice

Consider the class below:
Class Test
{
Static void Main()
{
Int[] a = {99,22,11,3,11,55,44,88,2,-3};
Int result = 0;
For (int i = 0;i < a.Length;++i)
{
If (a[i] > 30)
{
Result += a[i];
}
}
Console.WriteLine($"Result is: {result}") ;
}
}
The output of this C# program will be:


A) Result is: 280
B) Result is: 154
C) Result is: 286
D) Result is: 332

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions