/* NAME: printing.c DESCRIPTION: Teaches about compiler errors, inclusion, header files, and the standard input/output header. SYNOPSIS: ./a.out */ int main() { printf("Hello World\n"); return(0); } |
cc printing.c |
$: > cc ./printing.c ./printing.c: In function "main": ./printing.c:6:2: warning: incompatible implicit declaration of built-in function "printf" [enabled by default] printf("Hello World\n"); |
$: > man printf |
$: > cc ./printing.c ./printing.c: In function "main": ./printing.c:6:2: warning: incompatible implicit declaration of built-in function "printf" [enabled by default] printf("Hello World\n"); |
$> man ls |
1 User Commands 2 System Calls 3 C Library Functions 4 Devices and Special Files 5 File Formats and Conventions 6 Games et. al. 7 Miscellanea 8 System Administration tools and Daemons
$> man 3 printf |
SYNOPSIS #include <stdio.h> int printf(const char *format, ...); |
/* NAME: printing.c DESCRIPTION: Teaches about compiler errors, inclusion, header files, and the standard input/output header. SYNOPSIS: ./a.out */ #include <stdio.h> int main() { printf("Hello World\n"); return(0); } |
$> cc printing.c $> ./a.out Hello World $> |