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 of the following terms could be applied to the Non-Aligned nations during the Cold War? a.diverse b.capitalist c.communist d.democratic
Make a table to find the area covered by 10 tiles that measure 6, 12, 15 and 24 inches on one side
explain how to use mental if it took marty 42 minutes to write a book and 18 mins correcting his report.
Can someone give me an example of an ecosystem and explain how it's self-supporting
How did the Great Schism come about? A) Two different popes were appointed. B) The plague spread through Europe. C) France and England fought over lanD) D) Joan
If f(x) =tan(2x) then f'(pi/6)?
find the sequence of number 4, 16, 36, 64
Which country focused most of their exploration on going around the southern tip of Africa
what two numbers multiply to get 30 also add up to get -4????
the area of a square is 144 square inches. what is the perimeter of the square in feet?