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

compare and contrast elements and compunds
Is it possible to build a triangle with the side lengths of 9,7, and 16? Please help! 11pts!!
the length of a rectangle is 1 more than 3 times the width. if the perimeter is 98. what is the length ?
djfkmgjnmkdlcf dlvvnnnnnnnnnnnnnnnndf dkfgvjnpmlkddddddv, c fvfdbvcd
Why are passive readers most likely to have difficulty focusing on a text? They use too many strategies. They do too many things at once. They prefer re-reading
PLEASE HELP! I WILL MAKE YOU BRAINIST!
The costs of Standard Oil's business practices outweighed the benefits because the company had too much political power and was not fair to its workers.
A 5K race is about 3.1 miles. Kevin runs 3.5 miles on Monday, 4 miles on Wednesday and 1.8 miles on Friday. About how many 5K races would Kevin have completed?
WILL GIVE BRAINLIEST!!!!!! People do look at transportation options when considering neighborhoods to which to move. True False
In Jamie's town, there are 42,812 adults and 12,358 children. About how many more adults than children are in Jamie's town?