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

find the range from 54 to (-13)
predict the miles traveled in 5 hours at a rate of 189 miles in 3 hours
How long does the Knight have to fulfill this mission? The Wife Of Baths Tail question
Which of the following is NOT a method that Sigmund Freud used while trying to understand his patients' unconscious processes? a. introspection b. case studies
Which of the following groups of words is a sentence fragment? A. When we stopped by the garden. B. Stopping by the garden, we saw that the flowers were in bl
A website has 13,406 people registered. What is this number in word form
Highest common factor of 99 and 63
In a cell information that controls the production of proteins must pass from the nucleus to
what did henry stanley do to help king leopold the 2nd of belgium?
Sue uses the expression 8×3000+8×200+8×9 what is sues multiplication problem