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

What does “re-use the words of the question (this becomes your thesis)” mean?
please help I really don't get this I will help you with yours
WHAT DO YOU USE TO MAKE A VOLCANO?
Is it possible for your hips to grow? True or False?
In the btnSub_Click event handler, add the Visual Basic instructions to do the following: A. Define a procedure level constant named intTwo with an integer dat
Jim works mowing lawns and babysitting. He earns $9.40 an hour for mowing and $7.70 an hour for babysitting. How much will he earn for 1 hour of mowing and 4 ho
Graph the function f(x)=4x^2
From which criminological theory is the insanity defense derived from?
If there are no chemical controls which can be implemented at your worksite, what can you do to protect yourself? A.) Sue the company B.) Ask someone else to do
Five times the difference of twice a number and twelve is negative twenty. Find the number. I need help with this guys please someone help