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

Emily catches the school bus at 7:45 am she needs 30 minutes to get dressed 15 minutes to eat breakfasts, an 10 minutes to walk to the school bus . What latest
101. Vigd Levy11. The reproductive system includes all of the following except the:a. testes.b. ovariesc. ureter.penis.​
How would circumference be used when riding your bike?
What is the ordered pair of y-3=5(x-2)
What makes an effective performance of a Shakespeare comedy
Which of the following statements about the American party is false
JJ walks 1.3 miles in .45 hour. How many miles will he walk in 1.5 hours? A.4.13 B.4.3 C.4 D.4 1/3
What is the difference between Biotic and Abiotic?
please help especially with a. thank you!!
help answering these in french!!! Complete the captions for these illustrations with appropriate expressions. Note that some verbs are in the present tense and