f740e04b16b898e6b8e4d02fd4177558d9a009b5
[sws1-1415.git] / ass2 / mart / sws1-s4109503-s4202015 / exercise3.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <stdbool.h>
4
5 int main(void){
6 printf("A bool uses %lu bytes\n", sizeof(bool));
7 printf("Hex representation of true: %X\n", true);
8 printf("Hex representation of false: %X\n", false);
9 /* Running the following code shows that all but the 0x00 byte evaluate true */
10 /* for(unsigned char i = 0; i<255; i++)
11 printf("Hex %x evaluates to %s\n", i, i ? "true" : "false");*/
12 return 0;
13 }