Hello World
#include <stdio.h>
int main() {
printf("Hello");
return 0;
}
Structs
struct User {
int id;
char name[20];
};
Pointers
int val = 10;
int *ptr = &val;
printf("%d", *ptr);
Malloc
int *arr = malloc(5 * sizeof(int));
free(arr);
Input
int x;
scanf("%d", &x);
File IO
FILE *f = fopen("t.txt", "w");
fprintf(f, "Hi");
fclose(f);