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

why do black holes happen
What is the range of possible sizes for side x?
The sales tax for an item was $28.80 and it cost $360 before tax. Find the sales tax rate. Write your answer as a precentage
Q2: The RMS potential difference of an AC household outlet is 117 v. a) What is the maximum potential difference across a lamp connected to the outlet? b) If th
Hi.If you respond you get 30 points. lol
Urgent Help Please High Reward!
Matching quantities with units
Find the equation of a line that is parallel to y=x+3 and passes through the point (-2,-4)
which of the binomials below is a factor of this trinomial? x^2+6x-40
what is the name of the relationship between 1 and 8