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

I need to know standard to slope intercept form
how did humayun died
Can someone help me with this? Please.
Which part has fibrous type joints that do not allow movement?
correct the capitalization. Some goals the Lewis and Clark expedition were exploration and Scientific Research.
Does the accuracy of the model seem to be different when coupons are used or​ not? When advertising is used or​ not? Choose the correct answer. A. The differenc
The hypotenuse of a right triangle measures 3 cm and one of its legs measures 2 cm. Find the measure of the other leg. If necessary, round to the nearest tenth?
what is a what is a cmpwhat is a what is a cmp​
You have a 400ml beaker with 100ml of water you add 2 sugar cubes to the water the concentration of the solution (in sugar cubes/ unit volume of water is
Don't cross the road ! the bus ( come ).​