execute c

i wish to have a shell script which receives the file name and path (from the user) to a text file that contains a c program and compiles the program code using gcc and displays the execution of the compiled file (which is saved as filename.c) in the terminal / konsole

Can any one help me by writing the code

Please don't post homework questions...read the rules of the UNIX forums.