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?
int a,b;
a = (b = 10) + 5;

What will be the output of the following C# code?
int a,b;
a = (b = 10) + 5;
a) b = 10, a = 5
b) b = 15, a = 5
c) a = 15, b = 10
d) a = 10, b = 10

Answer: c
Explanation: b is assigned 10 and after that its value is added with 5 and then saved in a, so a will be 15.

Join The Discussion