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

Find the ordered pairs for the x- and y-intercepts of the equation 2x-6y=24 and select the appropriate option below. A) The x-intercept is (2,0); the y-intercep
_____ systems have a membrane that separates the internal chemicals from the external chemical environment.
Find the area of the equilateral triangle if a side is 14√3 ft. Round to the nearest whole number.
College fairs have schools' information in all of the following areas except: A. financial aid. B. admissions requirements. C. notification of admissio
Which one would it be
Monetarism is a school of economic thought that favors:
Find the value of each determinant
1. Solve -2n + 5 > 7. 2. Kia experimental probability of striking out at baseball is 13%. Out of 30 times at bat about how many times will she strike out?
A drawer contains 4 red socks, 8 white socks, and 6 blue socks. Without looking, you draw out a sock, return it, and draw out a second sock. What is the probabi
9 - 12n 2 + 4n 3 - 7n