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

3.A golf ball is hit of it’s tee, 200m down the fairway. Draw diagrams to show all the forces acting on the ball a) When the ball rests on the tree b)while th
anyone know the answer to this question
Technology very rarely changes because there are many new problems. Trueor False
please answer. ✓✓✓✓✓✓✓✓✓✓✓✓
Most of China’s population is located in the eastern half of the country, which has __________ climate Humid continental Humid subtropical Semiarid steppe Cool
(NEED ASAP) What is the number placed below an element’s symbol in a chemical formula called? a product a reactant a coefficient a subscript
Using the prototype model, how would one form a concept of a fish?
Can someone please help me in answering this!?! The language is C++
Please help me hurry will mark brainliest
Which type of parenting characteristic lends itself to wanting to be more of a friend than a parent?