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

Convert 34 over 9 into a mixed number
The first thing a group should do when they meet is to
What is 3 9/20 written as a decimal?
People questioned whether or not Paul was an apostle. True False
Why is the "gifted sister" discouraged from reading and writing?
Why is nichrome wire used in a flame test?
The Ring of Fire is where many volcanoes occur because the _____ plate is subducted in nearly every region.
The revolution was almost two years old, and already there was talk of an impending crisis. What is the meaning of impending as it is used in the sentence? A.
Your car averages 380 miles on a 14-gallon tank of gas. you run out of gas on a deserted highway, but have a half gallon of lawn mower gas with you. at the curr
A lithium oxide compound is represented by which formula?