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

NEED HELP ASAP! The graph gx is a translation of the function fx=x2. The vertex of gx is located 5 units above and 7 units to the right of the vertex of Fx. Whi
Which statement best supports the idea that the United States has a progressive income tax?A.The more money someone makes, the higher the percentage he or she p
Which negative effect of grief influences physical health?
If f(x)=3x - 15', thenNf^(-1)(x)= Enter the correct answer.
How does transpiration pull work?
Question :The letter was being written by my brother when my sister came in. * change to Active Voice​
A widget company produces 25 widgets a day, 5 of which are defective. Find the probability of selecting 5 widgets from the 25 produced where none are defective.
If sin A = 3/5 and the cosA =4/5 then what is tan A
-2x+3=-3(-x)-2 solve the equation for x by graphing
Identify a disease state that could be treated with gene therapy.