Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

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);
}

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);
}
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: b
Explanation: Output :
{
int x = 10, y = 20;
int res;
x % y == 0 ? y += 10:(x += 10);
Console.WriteLine(res);
}

Join The Discussion