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

Displays unsolicited advertisements in banners or pop-up windows
What is the mood of the poem "In My Shyness" by Jason Yarkie? Can you look it up on the internet, read it, and tell me the mood. I need it by tonight.
Convergent thinking utilizes creativity to generate possible solutions. t/f
How do you feel about the terms of the treaty of Versailles
Earth’s axis tilts at a _____ angle from its orbit. A. 23.5° B.45° C.143.5° D.90°
How one interprets the world is referred to as?
Compare the emergence of nation-states in nineteenth-century Latin America with the emergence of nation-states in ONE of the following regions in the twentieth
Conducting research about an occupation, company, or job can increase your employability. Please select the best answer from the choices provided T F
5. How did the reforms of Deng Xiaoping help China A. China maintained its dedication to communism B. China continued the Cultural Revolution. C. China became a
100-99+98-97+96-95...2-1=