cklangford98 cklangford98
  • 02-03-2018
  • Computers and Technology
contestada

Given the code below, what would output to the Console Window?

Think carefully on this one...it is tricky!
C#
1
string a = ”10”;
2
string b = “20”;
3
Console.WriteLine(a+b+5);

Respuesta :

spikespaz
spikespaz spikespaz
  • 03-03-2018
I don't know C# but based on experiences in other OOP languages and languages in general, you get a type error, whatever format that may be for C#. You cannot concatenate "10" and "20" as strings and then attempt to add an integer 5 unless the language has inferred type coercion.
Answer Link

Otras preguntas

Write (7 + 3i) + (6 − i) as a complex number in standard form. A) 13 + 2i B) 10 + 6i C) 13 + 4i D) 13 − 2i
What happens to a mountain in terms of isostatic adjustment following a period of significant erosion?
Which of the following is an example of "indifference" A.) ignoring a crying child. B.) crying at a sad commercial. C.) watching a football game
Points points points
You bought a car for $20,000. You have owned it for one year, and it is now worth $16,000. What is the percent decrease in your car's value?
How do u find the answer
what kind of system is the set of equations? -5x+3y=-5 -5x+3y=1
find the value of x and unknown interior angle for each triangle
Why does Imamu run away in the disappearance by Rosa Guy
what is the answer for question 9