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

a box 750 grams. there are 25 such boxes. what is the total weight of the boxes in kilograms? give your answer to the nearest tenth.
Which country took the western half of Poland when Germany invaded? A Prussia B The Soviet Union C Italy D Greece
Steps to solve: 28x - 12 + 2x - 4 - x
how old is an adult male frog
Signs and symptoms recur and become worse during __________. a. remission b. complication c. relapse d. exacerbation
who leads the house of representatives, and how is this role different from that of the leader of the senate
Many Greek tragedies and comedies have survived to this day. a. True b. False
What is the discriminant D of the equation? 6y2 + 2 = –7y D = _________
Felicia wrote, . . . I’ve dreamed since childhood of working on a ranch . . . where thoroughbreds were raised. Where should quotation marks be added? before the
Anaerobic photoautotrophs were the first organisms to release oxygen into the early atmosphere. a. True b. False