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

find the slope intercept form of the equation of the line that passes through(3,4) and (1,0)
Juli uses 12 ounces of cheese in her potato soup recipe. Her recipe yields 8 servings. If Juli needs enough for 20 servings, how many pounds of cheese will she
What religion dominates the northern part of africa?
MargeMarge cut 16 pieces of tape for mounting picture on a poster board .each tape was3/8 inches long...how much tape did she use ?
Acute glomerulonephritis (agn) may be accompanied by a positive throat or skin culture for which bacteria?
Parmigianino fled___ to after the sack of Rome in 1527
Conservative moralists saw the flappers as a positive influence on society true or false
When the reddish-brown mercury(ii) oxide (hgo) is heated, it decomposes to its elements, liquid mercury metal and oxygen gas. if 1.19 g hgo is decomposed to hg,
The biggest factor in determining the price of a mortgage is : A the down payment B the interest rate C the lender D the total cost of the home
which of the following pairs of lines are perpendicular