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

What is 20÷359 long division
The maximum contaminant level of copper (Cu) in drinking water as set by the the Environmental Protection Agency (EPA) is 0.0013 g⋅L−1 . Express this concent
GE bzbbsbsvzvxvxvzbsbbhhhhdhd NFC dhehehehshbsbabdhsnzjdndbdbdhdbvdbzjajs
Solve by substitution x-2y= -25 and 3x-y=0
What check does judicial branch have if congress passes a bill that when enacted would be in violation of the American Disabilities act?
how to calculate the mode 5,10,12,4,6,11,13,5
D(n)=8-6(n-1) find the 6th term in the sequence
Describe how sex-linked genes are expressed differently in males and in females
The perimeter of a regular octagon is 24a + 48 inches.(a) write an expression for the length of any one side of the octagon. The perimeter of a regular octagon
Ionic bonds, like all chemical bonds, form in order to make the new substance formed