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

Laura and Martin obtain a 20-year, $90,000 conventional mortgage at 10.5% on a house selling for $110,000. Their monthly mortgage payment including principal an
10. There are ____ people in the room. (much,many, a lot of)
*Riddle* Who's the fool? The homeless man, or the one that feeds him?
7. -5a + 7 = -38 Please show your work
The following scores represent students' test grades in Ms. Mihal's math class. Test Scores 78 84 78 85 93 85 84 78 93 85 84 78 84 78 93 85 93 85 What is the me
You drop an unknown substance that weighs 8.3g into a graduated cylinder with 6ml of water. The water rises to 8ml when you drop the object in. What is the dens
A matter for presentation is written in 24 pages. Each page has 20 lines. If the number of lines per page is increased to 24, then in how many pages will presen
mention two factors whichaffect pressure due toliquid contained in a vessel​
The Toleration Act of 1649 was established in which colony O Maryland North Carolina O Virginia о O Georgia
I need help please with number 2 & 3...