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 the equation in function form.then graph the equation x-3y=-9 ???
se quiere embotellar 43,5 litros de leche en botellas de 0,750 de litro ¿cuantas botellas se necesitan?
A toy rocket is shot vertically into the air from a launching pad 5 feel above the ground with an initial velocity of 80 feet per second. The height h, in feet,
Write down a sensible metric unit for measuring A) the distance from London to Paris B) the amount of water in a swimming pool
n^2+7n+15=5 show work please
Can someone help me please got to be in tomorrow
What happened to Mohenjo-Daro and Harappa? (They're two ancient cities in ancient India)
how did jazz demonstrate the independent spirit of the times?
solve for m (r=3m+3z) solution is m=___, use integers or fractions for any numbers in the expression (simplify answer) please help
if square root of 405 rounded to the nearest thousandth is 20.125  how do u simplify to get to that answer, thank u.