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

earring fell into the sink any suggestions?​
Which is one idea from the federalists and Anti-federalists appears in the U.S constitution today?
WHAT IS OPERANT CONDITIONG
Find the slope of the line that passes through the following points: [tex]`\left(\frac{2}{5},\frac{2}{3}\right)\ \ \left(-\frac{4}{9},\frac{3}{5}\right)`[/tex]
Claim By making information instantly available, the Internet has changed the way humans learn. Evidence A report from the Pew Research Center explains that 7 p
If −x+8y=−3 is a true equation, what would be the value of 2(−x+8y)?
Given the Trapezoid ABCD Find the length of AD Pls hellpppp
What is the surface area of the sphere below? O A. 64pi units2 B. 512pi units2 O C. 512pi^3 units2 D. Cannot be determined
Find the lateral area of this cone. Leave your answer in terms of . 15in 12 in LA = [ ? ]t in Hint: Lateral Area of a Cone = mre Where e = slant height
WILL GIVE BRAINLIEST