In this post, you’ll learn how to find the version of C that is installed on your machine which you are using.
C Program to find the version of C
C comes in three different ISO versions: C90, C99, and C11. Check the following to see which C version your software is using:
#include <stdio.h>
int main(int argc, char** argv) {
#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
return 0;
}
Leave a Reply