Ask Question
9 August, 04:57

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);

+1
Answers (1)
  1. 9 August, 05:38
    0
    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.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “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 ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers