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

What is three tenths divided by four fifths?
what happens to a substance undergoing thermal expansion
How can you calculate the area of the circle if you know the circle’s circumference?
Define tissue and explain where it falls in the hierarchy of structural organization
What the square root of 122896 is
What are the two cells whose union causes fertilization?
What is the radius of a sphere if its surface area is 2,122.64 square inches? (Use 3.14 for .) 11 in. 13 in. 121 in. 169 in.
According to Galileo, this quantity is not needed to keep a body in motion under ideal conditions.
which country was not a scene of early fighting in world war II
18 children at park 2 times more boys then girls how many boys at park