diff --git a/C/YT-BroCode/CSTD/cstd.c b/C/YT-BroCode/CSTD/cstd.c new file mode 100644 index 0000000..83b373f --- /dev/null +++ b/C/YT-BroCode/CSTD/cstd.c @@ -0,0 +1,18 @@ +#include + +int main(int argc, char** argv) { + // Check for C standard version + #if __STDC_VERSION__ >= 201710L + printf("We are using C18!\n"); + #elif __STDC_VERSION__ >= 201112L + printf("We are using C11!\n"); + #elif __STDC_VERSION__ >= 199901L + printf("We are using C99!\n"); + #else + printf("We are using C89/C90!\n"); + #endif + + // Indicate successful execution + printf("C standard is: %ld\n\n", __STDC_VERSION__); + return 0; +} diff --git a/C/YT-BroCode/Strings/strings.c b/C/YT-BroCode/Strings/strings.c index 6754d2a..881edeb 100644 --- a/C/YT-BroCode/Strings/strings.c +++ b/C/YT-BroCode/Strings/strings.c @@ -11,6 +11,8 @@ int main() { name[strlen(name)-1] = '\0'; // This removes the newline character at the end of 'name' variable printf("\n\nHello %s!\n\n", name); + // strset(name, '?'); + // printf("How are you %s?\n\n", name); return 0; }