Commit 98e0871b authored by Sander van Veen's avatar Sander van Veen

Merge branch 'master' of ssh://vo20.nl/git/uva

parents a2323294 a1e06b6e
FLAGS=-Wall -Wextra -std=c99 -pedantic
all: fp speed
speed: speed.o
gcc $(FLAGS) -o $@ $^
fp: floating_point.o
gcc $(FLAGS) -o $@ $^
%.o: %.c
gcc $(FLAGS) -o $@ -c $^
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#define PRINT_SIZE(TYPE) (printf("Size of " #TYPE ": %d\n", sizeof(TYPE)))
int main(void) {
PRINT_SIZE(float);
PRINT_SIZE(double);
PRINT_SIZE(long double);
return 0;
}
File added
#include <stdlib.h>
#include <stdio.h>
int main(void) {
int i;
for(i=0; i < 1e9; i++);
printf("i = %d\n", i);
return 0;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment