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

quien ha vuelto temprano
what is the area of a rectangle if the length is (7x-4) inches and the width is (10x+5)?
anybody know this i need help
What is 1,000,000+60,000+4,000+500+2 in expanded form
What event did the government used terrorism against its own people
Which cause and effect diagram best illustrates one main effect of informed citizens on the political system?
How does a federal health agency most likely control health effects from asbestos exposure?
Pleaseeeeeeeee helpppppppppp
Please please help CDEF is a kite and m
A 76 ​-ton monolith is transported on a causeway that is 2500 feet long and has a slope of about 3.4 degrees. how much force parallel to the incline would be re