diff options
Diffstat (limited to 'semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c')
| -rw-r--r-- | semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c b/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c new file mode 100644 index 0000000..83f9ece --- /dev/null +++ b/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c @@ -0,0 +1,17 @@ +#include <stdio.h> + +int main(){ + int i; + for(i = 0; i>= 0; i++); + printf("int\nmax: %d\nmin: %d\n\n", i-1, i); + + char j; + for(j = 0; j>= 0; j++); + printf("char\nmax: %d\nmin: %d\n\n", (char) (j-1), j); + + short k; + for(k = 0; k>= 0; k++); + printf("short\nmax: %d\nmin: %d\n\n", (short) (k-1), k); + + return 0; +} |
