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 measurements could NOT represent the side lengths of a right triangle? A. 15 m, 9 m, 12 m B. 10 cm, 49.5 cm, 50.5 cm C. 48.5 ft, 32.5 ft, 39ft D.
Why should you never leave anything visibly reacting unattended a) It's against the rules b) Safety concerns and potential hazards c) Saves time d) Instructor's
genetate two equivalent fractions for the fraction 7/8​
Drag each label to the correct location on the image. Match the type of hotel to its typical characteristics. 24x7 room service inexpensive accommodations laund
(8 - 2x) + 3(4.5r + 9)
why do earthworms come out during heavy rainfall?​
Lexa works at a camp arcadia during the summer to make some extra money for school. she works 20 hours a week and $9.25 an hour. lexa usually works 80 hours a m
Solve for x in the parallelogram below A. 8 B. 12 C. 20 D. 2
can someone pls do this, I'm offering high points can someone just please help me understand​
1) After reading the text On the Oregon Trail, identify the parts of the story. You will use this to complete your assignment. Exposition Rising Action Cli