Ask Question
25 October, 01:50

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

+4
Answers (1)
  1. 25 October, 04:46
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers