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

HELP QUICK PLEASE Determine the following values of the function. f(-3) = f(2) =
What is the probability that a card selected at random from a standard deck of 52 cards is an ace or a heart? (enter the value of probability in decimal format
How many calcium ions are there in caco3?
describe how the ultrasound technology or research involves electromagnetic or sound waves
Martin wants to use coordinate geometry to prove that the opposite sides of a rectangle are congruent. he places parallelogram abcd in the coordinate plane so t
Find the axis of symmetry of the graph of the function. f(x) = 2x^2 - 4x - 1
What made it difficult for New England colonist to repay the English investors who had funded them
Two students measured the length of their desk each using a different meter stick. One student reported a length of 18 cm and the other reported a length of 82c
What number should be placed in the box to help complete the division calculation
How can studying the opinion an art critic be educational?