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

Persistent anger can have long-term physical effects on the human body True or false?
n relation to natural gas, where is crude oil generally found? A. above natural gas reservoirs B. next to natural gas reservoirs C. below natur
A table is on sale for 65% off. the sale price is $154 . what is the regular price?
Extrovert and Self-conscious: Is Neither synonyms or antonyms.
A segment of DNA has this base sequence: ACG TAG TCA GTA. Which is the base sequence of the complementary DNA strand? A.) TGC ATC AGT CAT B.) CAT GCT GAC TGC C.
At the top of the system of inequality in the former soviet union were the ________
Answer plz I need help
How did the muslim military elite ensure the recruitment of troops and their loyalty?
9( 2k + 3 ) + 2 = 11 ( k- y )
How did people react to the repeal of the stamp act?