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

Enter the coordinates of the point on the unit circle at the given angle. 150 degrees. please help!
If f ( x) = 4x 2 and g( x) = 5x , what is g( f (2x)) ?
Helppppp............
List the coordinates of FOUR vertices that create the feasible region on the graph. Submit your answer in the form of FOUR ordered Pairs (x, y)
Which program offers nutrition screenings at no cost? A. food distribution centers B. Meals on Wheels C. SNAP D. workplace wellness programs
what is the IUPAC name of KNO3​
What is the mass in grams of 1.00 gal of water? The density of water is 1.00 g/ml.
I will give brainliest!! THERE IS NO OTHER INFORMATION GIVEN!! In ⊙O, chord XY is 8 cm long and is 10 cm from O. What is the radius ⊙O?
Explains how to find n, the number of copies the machine can make in one minute and How long will it take the machine to print 5,200 copies
Show that (a - b)+(b-c)+(c -a)3 = 3 (a - b) (b -c) (c-a)​