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

Read the point and the chart below. Point: Gilgamesh has the bravery and strength to triumph in battle. Which statement best completes the blank in this cha
3k-7/5 = 16 what is does k equal?
why did some feminists criticize Friedan for ideas in The Second Stage?
which feature helps a cactus plant prevent water loss in a hot dry desert environment
An _____ image cannot be projected and forms where light rays appear to originate
a store receives a shipment of defective balloons. each has a tiny pinhole of the same size. if one balloon is filled with helium and another is filled with ai
How many moles of methane were in the erlenmeyer flask?
Like many pieces in the nineteenth century berlioz's symphonie fantastique is
please help me and justify your answer plese I really need help
What is 2 times y in an algebraic expression I need help