Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
stdout vs console.write in c#

I am VERY new to C#/programming and as a learning exercise completed an online challenge to change text to lowercase. The challenge specified it must 'print to stdout' yet I completed the challenge by using Console.Writeline

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lowercase
{
    class Program
    {
        static void Main(string[] args)
        {
            using ( StreamReader reader = new StreamReader("TextFile1.txt")) 
            {
                while (!reader.EndOfStream)
                {
                    string line = reader.ReadLine();
                    Console.WriteLine(line.ToLower());
                }

                Console.ReadLine();
            }
        }
    }
}

Is stdout just another name for outputting to console (submissions could be in many different languages) or did the online code submission just not check the output properly. I have googled 'stdout c#' but don't fully understand the results.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

In languages like C and C++, there is a global variable with the name stdout, which is a pointer to the standard output stream. Thus, stdout has become a commonly used abbreviation for "standard output stream" even outside the context of the C language.

Now, what does C# do? Let's have a look at the documentation of Console.WriteLine (emphasis mine):

Writes the specified string value, followed by the current line terminator, to the standard output stream.

So, yes, Console.WriteLine does exactly what you need to do. If you need a direct reference to the standard output stream (Hint: you usually don't), you can use the Console.Out property.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda