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.

What will be the output of the following C# code?
static void Main(string[] args)
{
int x = 4 ,b = 2;
x -= b/= x * b;
Console.WriteLine(x + ” ” + b);
Console.ReadLine();
}

What will be the output of the following C# code?
static void Main(string[] args)
{
int x = 4 ,b = 2;
x -= b/= x * b;
Console.WriteLine(x + ” ” + b);
Console.ReadLine();
}
a) 4 2
b) 0 4
c) 4 0
d) 2 2

Answer: c
Explanation: x = x – b and b = b/(x*b).
Output:
4 0

Join The Discussion