[root@hosta ~]# rpm -qa --queryformat %{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n | grep libstdc compat-libstdc-33-3.2.3-61 (x86_64) compat-libstdc-296-2.96-138 (i386) libstdc-4.1.2-48.el5 (i386) compat-libstdc-33-3.2.3-61 (i386) libstdc-4.1.
[root@hosta ~]# rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libstdc++