yep i think you are doing the right things try:
it will give you information the version of installed gcc.
you can try also to compile a single file. make this file with the name e.g. hello.c
then compile it with the command :
# gcc -Wall hello.c -o hello.o
Yast is avery good place to install packages. You should look there first if you want to install something