Here is the code we wrote today:
/* * to compile and run: * gcc -Wall -std=gnu99 -o hello hello.c * ./hello */ #include <stdio.h> int printDots(); int main() { printf("Hello World!\n"); //print message int x = 20; double y = 3.14; if(x < 10) printf("It's less\n"); printDots(); while(x > 0) { printf("%x %d%%\n", x, x); x--; } printf("\n"); int david[10]; for(int i=0; i < 10; i++) david[i] = 0; david[3] = david[4]; } int printDots() { for(int i=0; i < 10; i++) printf("."); printf("\n"); return 42; }