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

simplify (2a−4b)+2(a−4b)
5. In what ways American public check the power of the Judiciary?
An organism that eats other organisms is called a...
Complete the steps to find the surface area of the cylinder. The area of the base is Pi in.2 The circumference of the base is Pi in. The area of the lateral sur
an someone help me on this
All of the following were progress made in Texas in the late 1800 through early 1900's EXCEPT a Invention of the car b Expansion of the Railroads c Use of Te
Your 2500 gallon pool has sprung a leak and loses 70% of its water every 10 minutes. How much water will remain in the pool after 30 minutes?
MATH -- please answer these two
Type the correct answer in the box. Spell all words correctly.Which section of a business plan gives details about a business’s core products and services? plea
values equivalent to 1/4​