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

PLEASE HELP THIS IS SCIENCE AND PLEASE GIVE ME THE RIGHT ANSWERS THANKS!!! What is a factor that limits a technological design? A. a prototype B. a trade-off C.
what are two decimals to 0.9
How do u solve ratios
FIRST ANSWER IS BRAINIEST SO HURRY QUICK QUICK FIRST ANSWER IS BRAINIEST ANSWER SO HURRY QUICK QUICK 5 MINUTES ONLY REALLY EASY QUESTION QUICKAdaptations : scal
A square piece of fabric has side length 2.2 cm. Find the area of the piece of fabric.
Jill had $90. She bought a skirt that normally costs $42 but was on sale for half price. She also bought a T-shirt that was $8 off its regular price. Before sal
Estimate the unit rate if 12 pairs of socks sell for $ 5.79
identify at least three different types of clinics
Together, the populations in an ecosystem form a(n) __________.
What is the Persians major holidays