Commit a1e06b6e authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added Simmod folder and assignment 1.

parent b691a5fa
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