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

When Seb reconciles his accounts, what is the first step he should take?
Aristotle taught his rhetoric students that arguments, reasoning, and evidence are used to support claims. when a persuasive speaker plans and prepares the mess
which equations have a solution of -6?choose all answers that are correct.x/-3 = 218x = -3-8 = 4x/3-10x = -60-42 = 7x
round 514,733 to the nearest thousand
Another term used in place of the plot term denouement can be _______
What are the three laws of thermodynamics?
which word or phrase correctly completes this sentence ana_ panamá
How do I solve this problem b+2/b-1=4/5
What does the following prefix mean kilo deci,centi ,and milli
As the number of pages in a photo book increases, the price of the book also increases. There is an additional shipping charge of 15%. The price of a book can b