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

will give brainliest ​
Behavior that is harmful to one's self is ?
Where is the Oort cloud located? a. between the orbit of Mars and the orbit of Jupiter b. in the different orbits between the sun and Neptune c. beyond the Kuip
Amir’s average math score for the first 4 tests of the school year is 88 Which equation can be used to calculate what Amir’s average must be on the next two tes
Which factors can affect a stock's price? Check all that apply.
Velocity must always include?
Define symbol ..........​
t or f: In 1807, the railroad was an important means of mass transportation in the United States​
The following question references the novel The Red Badge of Courage by Stephen Crane Give three examples from the book of the Man vs Nature conflict regarding
If you were an innkeeper, what would do for work?