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

100 Points! Please Help Me
Which phrase best completes this sentence? Es necesario tener el ________________________________ para alquilar un auto. A. el pasaje de avión B. boleto de bus
Sun - Mercury - Venus - Earth - Mars. Omitting Pluto, what is the last planet in the sequence of planets in our solar system? A) Jupiter B) Neptune C) Saturn D)
Match the definitions to the terms: Terms: Hypotonic Solution Isotonic Solution Hypertonic Solution Diffusion Facilitative Diffusion Active Transport Passive
How might logarithmic functions relate to earthquakes?
The Run is the ___ Change between two points on a line
Match the people with their accomplishments. 30 points!!
Que consecuencias tuvo la introduccion de la cultura britanica en china????? El trabajo es sobre la guerra del opio
What does Luigi Barzini mean by “the importance of spectacle” and what does he attribute it to?​
explain the night life of florida​