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

Express the statement below as a fraction in lowest term 80% of American are home owners.
A segment of a circle has a 120 arc and a chord of 8in. Find the area of the segment.
It is easy to move genes from one species to another. Is it right to do this? explain your position
an interior designer is creating a plan for a new indoor play park why does he decide to use red as a main part of the color scheme
You are going to roll two dice. Let the variable x = the sum of the numbers rolled. What is the probability that x = 9 ?
Which sentence uses possessive personal pronouns correctly? A. Yours essay requires some minor revisions. B. Take you're time and drive carefully. C. After
how to write 16 as a fraction
A bird owner wants to purchase birdseed from the local pet store. Sunflower seeds sell for $8 per pound and regular bird seed sells for $6 per pound. How ma
what are the hardships that new York has to overcome
What is the source of energy for our weather?