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

Which of these features is relevant when choosing an Internet service provider? ancho de banda cámara web micrófono parlantes NextReset
Elise travels across thailand with her friends and, to her surprise, finds the country quite unlike the united states. "i hate the food," she tells her family a
How can finance manager improve revenues?
A restaurant took 1/10 of an hour to use 1/6 of a package of napkins at this rate how many hours would it take to use the entire package
The exit of russia from the war meant that president wilson could argue that:
what's 8 times negative 5
Grant is a member of a book club. He pays a $10 yearly membership fee and can purchase books through the club for $2.75 each. His total annual cost is a functio
What is the greatest common factor of a^6b^3 and a^4b^7
Under schwartz's circumplex model, hedonism is a part of two different quadrants: ________ and ________
1) Prehistoric people of central Asia moved to North America during the last Ice Age. Early people of the Middle East moved into northern Mesopotamia. Explain h