Foundations
Hello C
Start with a tiny C program that stores a name and prints a greeting.
Hello C
hello.c
#include <stdio.h>
int main(void) {
const char *name = ;
printf("Hello, %s!\n", name);
return 0;
}
#include <stdio.h>
int main(void) {
const char *name = ;
printf("Hello, %s!\n", name);
return 0;
}
#include <stdio.h>
int main(void) {
const char *name = ;
printf("Hello, %s!\n", name);
return 0;
}
main
`main` is the function where a C program starts running.
printf
`printf` writes formatted text to standard output.