Back to questions
JuniorTheoryCommon
What does the program print (lines separated by spaces)?
Console.Write("A");
Console.WriteLine("B");
Console.Write("C");
Console.WriteLine("D");AB CD
- Expecting
A B C D:Writeprints its text and leaves the cursor on the same line, soAandBend up together on the first line. - Expecting the line break before the text:
WriteLineprints its text first and only then ends the line, soCstarts the second line.
- What does
Console.WriteLine()with empty parentheses print? - Why do
WriteandWriteLineprint two words without a space between them?