Try using g++ --version command at cmd Because for me also g++ -version or g++ -v command hasn't worked.

Answer from Jupiter Debbarma on Stack Overflow
🌐
Finxter
blog.finxter.com › home › learn python blog › how to check your c version?
How to Check Your C Version? - Be on the Right Side of Change
June 23, 2023 - 😃 · Visual Studio also provides ... Visual Studio. You can find the installed version on your system by: Pressing the Windows key + R, type appwiz.cpl, and press Enter....
Discussions

How can i see what version of C++ do i have?
C++ does have different standards but since it is a compiled language, you do not install a version of it, unlike in interpreted languages such as Python. The compiler you use though, in most cases gcc or clang, does have a version. You can find out about this in the shell with: gcc -v or clang -v each version of a compiler has a default standard of C++ it compiles. This default you will find out with a quick google search involving your compiler's name and its version. Also, you can change the C++ standard using a flag. For gcc this would be: g++ -std= make sure to consult the corresponding man pages as well. More on reddit.com
🌐 r/cpp_questions
14
11
November 6, 2019
Need a function to extract Windows Name & Version in C/C++
I don't need a cross platform solution, i just need a function in C/C++ which will extract name and version of the WINDOWS OS e.g. the prototype should look ... More on forum.qt.io
🌐 forum.qt.io
2
0
August 28, 2023
standards - How can I know the version of c? - Stack Overflow
The "\b" didn't work on my Mac. So I tried to find the reason. I think that cause of this problem may be the version of C. Or device could be. If you know it, can you help me? Thank you. More on stackoverflow.com
🌐 stackoverflow.com
gcc - How can I tell what standard my C is in? - Software Engineering Stack Exchange
Okies, totally newbie question here. I can read the code, mimic the code and understand the basics to be deadly. But, I never really took the time to understand what ANSI C really meant. I just loo... More on softwareengineering.stackexchange.com
🌐 softwareengineering.stackexchange.com
March 26, 2016
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1724539 › where-to-find-correct-version-information-using-in
Where to find correct version information using in C on Windows - Microsoft Q&A
In general, feature detection is a much better option if you want to know what functionality is available for a version of Windows. This means using LoadLibrary/GetProcAddress to see if the function you are after is available for Windows API functions. In this case a null pointer will indicate that it is unavailable. Directly querying for the interface you require for COM. In this case the HRESULT of E_NOINTERFACE will indicate that it isn't available. You can use the API Query functionality for Windows Runtime objects.
🌐
Reddit
reddit.com › r/cpp_questions › how can i see what version of c++ do i have?
r/cpp_questions on Reddit: How can i see what version of C++ do i have?
November 6, 2019 - Since you have MinGW and you want to latest you'll need to look for · MinGW64. The latest version supports c++17 right now and that version can be checked in your command line.
🌐
Embarcadero
blogs.embarcadero.com › how-to-check-the-c-compiler-version-on-windows
How to Check The C++ Compiler Version On Windows – Embarcadero RAD Studio, Delphi, & C++Builder Blogs
March 1, 2023 - Type “dir”, You should see versions of RAD Studio, i.e. 22 · Goto this folder and bin directory inside by using cd command, i.e. “cd 22.0bin“ · Here are the C++ compiler binaries included in RAD Studio, C++ Builder. ... 6. You can check versions of these compilers by typing their executable names only as given example below
🌐
Microsoft Learn
learn.microsoft.com › en-us › cpp › overview › compiler-versions
Microsoft C++ (MSVC) compiler versioning | Microsoft Learn
3 weeks ago - It has the form: MMNNBBBBB. Use it to distinguish between different versions of the compiler, including servicing releases. For more information about Visual Studio 2019 versions 16.8, 16.9, 16.10 and 16.11, see Service releases starting with Visual Studio 2017.
Find elsewhere
🌐
YouTube
youtube.com › watch
How to check your C++ Compiler Version? - YouTube
In this tutorial, we will show you a quick and easy way you can check your C++ Compiler/Standard version. Website Link (code availible)https://coderslegacy.c...
Published   October 22, 2022
🌐
Microsoft Learn
learn.microsoft.com › en-us › windows › client-management › client-tools › windows-version-search
What version of Windows am I running? | Microsoft Learn
... You can also use winver or msinfo32 commands at the command prompt. At the PowerShell or Command Prompt, type systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version" and then press ENTER
🌐
w3resource
w3resource.com › c-programming-exercises › basic-declarations-and-expressions › c-programming-basic-exercises-2.php
Get the C version in use.
September 18, 2025 - #elif __STDC_VERSION__ >= 201112L checks if the C standard version is greater than or equal to C11 (2011).
🌐
CodeProject
codeproject.com › Articles › 5336372 › Windows-Version-Detection
Windows Version Detection
Disclaimer: References to any specific company, product or services on this Site are not controlled by GoDaddy.com LLC and do not constitute or imply its association with or endorsement of third party advertisers
Top answer
1 of 3
9

In the case of gcc, you can tell the compiler what C standard to use via the --std option. Running man gcc will explain this, and will list all of the standards that are supported. Note that there are lots of variations including some "standards" that are GCC specific extensions / variations to the official standards.

If you want to understand why certain things in your code are giving you warnings, you would need to trace back to the particular standard that the warning message is referring to, and READ the relevant part of the standard.


But, I never really took the time to understand what ANSI C really meant.

You need to remedy that. Your poor understanding is most likely the root of a lots of mysterious bugs that arise when you change compilers, port code from one platform to another, etcetera. (The kind of thing that lots of people incorrectly blame on "compiler bugs".)

2 of 3
5

If you were not consciously trying to follow the ANSI standard when writing the code, then most likely your code will not conform to any of the ANSI C standards.
The reason for this is because there are no C compilers that by default enforce an ANSI C standard, but they all accept their own dialect of C.

To add to that, if your program tries to do user-interaction in a more fanciful manner than "print a prompt and read a line of text", then you must already step beyond the facilities provided by ANSI C. If you are unaware of that, then it is easy to pick a solution that is specific for the compiler you are using at that time.


If you want to start following ANSI C strictly, then you must accept that your programs can't do fancy user interaction and can't support most other kinds of connections to the outside world.

If you don't actually care that much about standard conformance, but you want your program to be portable between different platforms and compilers, then you should learn about ANSI C to know what it provides and then deliberately choose portable (3rd-party) libraries for the features that you need beyond what the satndard offers you.

🌐
C For Dummies
c-for-dummies.com › blog
Which C Version? | C For Dummies Blog
December 10, 2022 - Thatʼs not to say, of course, that Visual C++ʼs language standard support hasnʼt improved over the years… but instead of a nice __STDC_VERSION__ macro, one has–had–to check the compilerʼs version by either testing against specific _MSC_VER (major/minor version) or _MSC_FULL_VER (major, minor, as well as build number) values:
🌐
Fresh2Refresh
fresh2refresh.com › home › c programming tutorial › c – environment setup using gcc
C Environment Setup using GCC | C Program | Fresh2Refresh
July 17, 2020 - Then, click on “Environment Variables” button and then “New”. You will get a popup window as shown below. Change the System variable as given below. ... 8. Type “gcc –version” in command prompt to check whether C compiler is installed ...
🌐
Dhgate
smart.dhgate.com › home › essential tips for how to check your c language version and standards easily
Essential Tips for How to Check Your C Language Version and Standards Easily - Smart.DHgate – Trusted Buying Guides for Global Shoppers
October 1, 2025 - Ever gotten stuck wondering why a piece of C code compiles fine on one machine but chokes on another? Or tried using features from C11 only to get weird
🌐
Support Your Tech
supportyourtech.com › home › articles › how to check windows version in windows 11: a quick guide
How to Check Windows Version in Windows 11: A Quick Guide
October 2, 2025 - Learn how to quickly check your Windows 11 version: open Settings, navigate to "About," and find your version under "Windows specifications."
🌐
Quora
quora.com › How-do-I-check-the-Microsoft-Visual-C-version-of-Windows-10
How to check the Microsoft Visual C++ version of Windows 10 - Quora
Answer (1 of 8): The Microsoft ... To check the Microsoft Visual C++ version of Windows 10: a). Go to Start, type 'control panel', and then press Enter. ## b). In Control Panel, selec......
🌐
Quora
quora.com › How-do-you-write-a-C-program-to-get-the-C-version-you-are-using
How to write a C program to get the C version you are using - Quora
Answer (1 of 3): Re “How do you write a C program to get the C version you are using?”: You can’t. Only you know what C “version” (standard revision) you had in mind when you wrote your program. Computers and software cannot read your mind. It’s up to you to make sure that you’re ...