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

Two types of student loans are _____. the perkins and stafford scholarships and stewardships grants and personal loans pell and academic competitiveness user: r
Suppose f(x) = 21-16x and g(x) = 12x-61. Solve f(x) > g(x)
is it bad being blind
The tearing down of the Berlin Wall was symbolic of the reuniting of East and West Germany. True False
Primary consumers eat ______________. a. producers b. secondary consumers c. decomposers d. tertiary consumers
Quadratic Equations: Write x^2 - 3x + 2 = 0 in standard form and determine a, b, and c
At the constitutional convention, the three fifths compromise " dealt with issys surrounding what issue
What is the difference between a single gene disorder, multifactorial disorder and a chromosomal abnormality?
Read the text of the Gettysburg Address, delivered by President Abraham Lincoln during the American Civil War. Which of the following best summarizes this excer
Whats the best diet for bulking?