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

Tell the value of the underlined digit 9,000,009 the first 9 is underlined
What does Lincoln mean when he says soldiers gave "the last full measure of devotion"?
F=3gh+7c solve for g
a jar contains 133 pennies. a bigger jar contains 1 2/7 times as many pennies. what is the value of the pennies in the bigger jar?
3. Bursting through the door, the flustered mother mother screamed uncontrollably at the innocent teacher who gave her child an F. Tone:______________________ C
Why did a division of labor occur when people started to produce a surplus of food?
Fern rounded to the nearest ten to estimate 548-132. She subtracted 540-130 and got 410. Is Fern's estimate correct? Explain.
What are the (3) most common elements that bond together to form organic compounds?
The quotient of a number and 5, minus 2,is 8.
What is a U.S. engineer's ride?