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

Which boy band released the hit ""i want it that way"" in 1999?.
calculate using multiplication method 145×188​
__________ ___________ was a democratic movement, expanding rights for the common man. However it only benefited white men.
Read and choose the correct option to complete the sentence: After I go to the mall today, I am going to the theater. When signing this sentence, you would ____
Why did the allied leaders begin to hold conferences starting in 1943? Select four options
Provided is a list of five different substances. How many of these substances are elements?.
what is the state that is a peninsula between the Gulf of Mexico and the Atlantic oceanNEED HELP ASAP!!
what is the geometric mean of 10 and 24
What is the value of x
How are velocity and acceleration related