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

Please answer and show work quickly and correctly.
17. Jenny is kicking a soccer ball to make a goal. She is 9 feet from the goal. The goal is 6 feet high. She kicks it one foot under the top of the goal. What w
Plot the points (0, −5) and (2, 4) on the coordinate plane. (Please answer quickly this is on a important grade unit test)
how to writ about scroog throghout the story
2 meters is the same as how many feet?
In exercises 1 and 2 find the scale factor. then list all pairs of congruent angles and write the ratios of the corresponding side lengths in a statement of pro
Which two sentences correctly describe copyright laws related to design solutions? In the United States, copyright is granted automatically once a work is creat
-7 2x-x^5 4x^4 2x^3 in standard form
Eric has 240 coins in his collection 11/20 of the coins are pennies 4/20of the coins are nickels the rest of the coins are quarters How many quarters are there
Ms. Tang has asked Keith and Judy to paint small hearts on their classroom walls. Keith has painted 33 hearts and is painting at the rate of 10 hearts per hour.