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

The coastline of the USA is 12,383 miles long. Canadas's coastline is 113,211 longer than the coastline of the USA. How long is the coastline of Canada
Which is the most effective starting point for the process of historical inquiry? analyzing the evidence asking the right question(s) developing an interpretive
what's the precise measurement for 1ft;12in?
show a way to decompose 749
What is dramatic license
what should the first paragraph of a cover letter include?
Determine which is greater, the length of a square whose area is 36 in squared or the height of a cube whose volume is 125 in cubed??? Please tell me how you go
Determine the position of a given value. -3,-8,-13,..........,-58 ( what position is -58, in other words )
Where is the majority of Earth’s freshwater found? A)Oceans? B)Ice caps? C)rivers? D)lakes? E)Aquifers?
How is the earth similar to and different from a spinning top?