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

How often does oxygen cycle through the atmosphere?
an equation stating that two ratios and rates are equivalent is a(n)
what gives a whole number multiplying, 0.65 and 58 by 10 or 100
Can someone please do number 30.
the tip of a match contains chemical energy. Kevin's father lit a match and blew out the flame. then he tried to light the same match again . Kevin observed tha
There are 200 paperweights in a box. The mass of each paperweight is 0.085 kilogram. The mass of the empty box is 560 grams. What is the total mass of the box a
Greatest Common Factor of 55 and 77
It costs $5 dollars to have A tote bag monogrammed with up to 12 letters and $.50 for each additional letter. A club has a budget of $8 dollars maximum per tote
what does genercized mean
In eukaryotic cells, the timing of the cell cycle is regulated by