check gcc version in ubuntu

C++
Option 1. Issue command “gcc –version” Example : ...
Option 2. Issue command “gcc -v” ...
Source

Also in C++: