Difference between revisions of "printf"

From SEGGER Wiki
Jump to: navigation, search
(Created page with "Category:Knowledge Base "printf" is a function in the C-standard library that outputs text to the terminal, typically debug console.")
 
m
Line 1: Line 1:
 
[[Category:Knowledge Base]]
 
[[Category:Knowledge Base]]
 
"printf" is a function in the C-standard library that outputs text to the terminal, typically debug console.
 
"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.
  +
<syntaxhighlight lang="c">
  +
#include <stdio.h>
  +
  +
int main(void) {
  +
printf("Hello world!\n");
  +
return 0;
  +
}
  +
</syntaxhighlight>

Revision as of 07:26, 6 July 2019

"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;
}