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

[tex] \rm \int_{0}^ \infty \frac{ \sqrt[ \scriptsize\phi]{x} \tan^{- 1} (x)}{(1 + {x}^{ \phi} {)}^{2} } {}^{} {} \: dx\\ [/tex]​
Given the function h of x equals 3 times the square root of x, which statement is true about h(x)? The function is decreasing on the interval (–∞, 0). The fun
Measurements of angles
A nurse is caring for a client who is nauseated and unable to eat after taking her antibiotic. Identify the steps the nurse should take to address the nausea
which practice of american government is reflected in this excerpt from Judeo-Christian principles?
What was one of the primary challenges that lenin faced in converting russia into a communist state?
If cosθ=2/3 find cscθ using identities. This is in quad. 1.
Mrs Smith visits THE SCHOOL - outfitters to buy school clothes for the new school year. The price of a school dress is R350 and a blazer is R650. Calculate the
Who is Macbeth? What was his title? can someone please help me :(
What did humankind gain from the industrial revolution?.