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

a soccer team played 160 games and won 65% of them. how many did they win?
Fragment in this sentenceWith her heavy dictonary, Donna thumps the top other ancient computer monitor.  Whenever the color tint flickers from normal to sickly
How did the Declaration of Independence change the nature of the American Revolution?
What sorts of signals does the brain use to communicate sensations, thoughts and actions?
What is the main religion of Latin america
There is an inverse relationship between x and y. If y is when x is 3, what is x when y is 9? 3 5
What culture believes health is harmony between man and nature?
Simplify (7-5i)(-3+9i)-(5+6i)^2
when we look at a leaf, we see the colors of light that are reflected off its surface. how does the relatively low flow of oxygen in green light?
a soccer team played 160 games and won 65% of them. how many did they win?