printf

From SEGGER Wiki
Revision as of 07:26, 6 July 2019 by Rolf (talk | contribs)
Jump to: navigation, search

"printf" is a function in the C-standard library that outputs text to the terminal, typically debug console.

Hello world

The simplest of all C-programs is known as "Hello world" program. It outputs "Hello world", using printf.

#include <stdio.h>

int main(void) {
  printf("Hello world!\n");
  return 0;
}