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 is the “SSS” for similar triangles different from triangles congruence
Which of the following right triangles have an area of 48 square inches? Select three that apply. A. A right triangle with base 48 inches and height 2 inches.
Which of following is not one of the steps in the data life cycle?A. data storageB. data useC. data collectionD. data accounting
convert the fraction below into a decimal 19/40
Two random samples of 25 people were asked how many 12-ounce cans of soda they consume each week. The first sample contained both males and females, aged 12-19.
In which way did the trend represented in this graph result in economic growth during this time period?
Which level of organization is the HIGHEST?
A, B, and C are consecutive odd integers such that A
In the poem, what “sad thoughts” is the speaker most likely reminded of as he observes the animals and plants around him? Answer choices for the above question
PLEASE HELPPPPP WILL GIVE BRAINLIEST!!