Select the relevant C# code set to fill up the blank for the following C# program?
static void Main(string[] args)
{
int x = 10, y = 20;
int res;
/*_______________*/
Console.WriteLine(res);
}
static void Main(string[] args)
{
int x = 10, y = 20;
int res;
/*_______________*/
Console.WriteLine(res);
}
A. x % y == 0 ? (x == y ? (x += 2):(y = x + y)):y = y*10;
B. x % y == 0 ? y += 10:(x += 10);
C. x % y == 0 ? return(x) : return (y);
D. All of the mentioned
Answer: Option B
Related Questions on Operators and Expressions in C Sharp
What does the modulus operator (%) do in C#?
A. Increments the operand by 1
B. Returns the quotient of a division
C. Performs multiplication
D. Returns the remainder of a division
Join The Discussion