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

Five different ways in which SATourism promotes tourism development and growth in South Africa as a destination of choice both local globally
electrons protons and neutrons make up a.all elements b. only elements found on earth c. the nuciel of atoms
which is the smallest number can be rounded off to 60
Draw the product of the hydrogenation of cis-2-pentene. draw all hydrogen atoms. g
How can the government promote economic efficiency?
Match each linear equation with its slope and a point on the line. (the top row label 1-5 and the side column a-d)
How many black men are in prison in the us?
Which of the following is a characteristic of an editorial? writing that is objective and unbiased writing that uses dialogue as its primary format writing to c
Numbered steps to follow would most likely be found in _____. A. a public document B. a technical article C.narrative writing D. technical direction
What is the effect of the author’s word choice in the passage?