gets / fgets
gets()
reads a line, terminated by a new line or EOF. For this reason, gets
should almost never be used because in normal circustances, it's impossible to know in advance how long the line will be.
fgets()
reads from a file rather than from
stdin and allows to specify the maximum amount to be read.
syscall
// #define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
int main() {
//
// Write some text to STDOUT (1). The lenght of the
// text is 12 (last paramter).
//
syscall(SYS_write, 1, "Hello World\n", 12);
}