send one character to the stdio

how can i send only one character without the
or 0x0A to the stdio? By me the single bytes are write in a buffer, i think, and when i send a 0x0A then the buffer was sent to the UART.


In C using printf() does not automatically add a newline (’
') character, unlike Java’s println() function. Simply do not include the ’
’ character in your output.

There are a couple of ways to do this:

char outputChar =‘A’;
printf(“%c”, outputChar);

char outputStr[32];
char outputChar = ‘A’;
sprintf(outputSt, “%c”, outputChar);
printf(“%s”, outputStr);

char outputChar = ‘A’;
putc(outputChar, stdout);

In the case of using printf(), you may find that the single byte does not get transmitted immediately. In this case you may want to call fflush(stdout) after the printf().