Example: Determining the installed version of gcc-c++

To see whether gcc-c++ is installed, query for the gcc-c++ package as follows:
   rpm -qa | grep gcc-c++
If gcc-c++ version is installed, you will get a result similar to the following output:
   gcc-c++-4.1.2-42.el5