commit 7ad3ed17d84f2f87a8237e98c46178a9a180bbd7 Author: bart.moyaers Date: Fri Nov 1 21:40:13 2019 +0100 add first examples diff --git a/hello_world/data_sizes.c b/hello_world/data_sizes.c new file mode 100644 index 0000000..fae5241 --- /dev/null +++ b/hello_world/data_sizes.c @@ -0,0 +1,25 @@ +#include +#include +#include +#include + +int main(int argc, char** argv) { + + printf("CHAR_BIT : %d\n", CHAR_BIT); + printf("CHAR_MAX : %d\n", CHAR_MAX); + printf("CHAR_MIN : %d\n", CHAR_MIN); + printf("INT_MAX : %d\n", INT_MAX); + printf("INT_MIN : %d\n", INT_MIN); + printf("LONG_MAX : %ld\n", (long) LONG_MAX); + printf("LONG_MIN : %ld\n", (long) LONG_MIN); + printf("SCHAR_MAX : %d\n", SCHAR_MAX); + printf("SCHAR_MIN : %d\n", SCHAR_MIN); + printf("SHRT_MAX : %d\n", SHRT_MAX); + printf("SHRT_MIN : %d\n", SHRT_MIN); + printf("UCHAR_MAX : %d\n", UCHAR_MAX); + printf("UINT_MAX : %u\n", (unsigned int) UINT_MAX); + printf("ULONG_MAX : %lu\n", (unsigned long) ULONG_MAX); + printf("USHRT_MAX : %d\n", (unsigned short) USHRT_MAX); + + return 0; +} \ No newline at end of file diff --git a/hello_world/hello_world.c b/hello_world/hello_world.c new file mode 100644 index 0000000..14f2044 --- /dev/null +++ b/hello_world/hello_world.c @@ -0,0 +1,8 @@ +#include + +int main() { + /* my first program in C */ + printf("Hello, World! \n"); + + return 0; +} \ No newline at end of file