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

no termino de entender esta parte de la tarea me pueden ayudar porfabor
What important role did women play in European Societies during the Industrial Revolution? O A. Holding political office in many poor or rural areas B. Particip
What is the definition of the radius of a circle? The distance from the center of a circle to a point of the circle 12. A flower garden is in the shape of a ci
How many solutions does the equation −5a + 5a + 9 = 8 have? None One Two Infinitely many
If a galaxy has an apparent velocity of 2300 km/s, what is its distance if the Hubble constant is assumed to be 70 km/s/Mpc
Jenna can buy 5 golf balls at Golf Central for $9.20 or 4 golf balls at Strictly Golf for $7.60. Jenna wants to buy 20 golf balls. How much will she save if she
-4 (r - 2/3) + 4 < -8
My hobby is_______________. A. cooking B. cook C. to cooking D. cooked
Explain whether or not it is easy to recycle electronics now
7,599 + 17 = = show work