I am using Oracle 10g database and trying to run a procedure using SQL commands.
create or replace procedure \"exam\" is begin DBMS_OUTPUT.PUT_LINE(\'Test\
Just noticed a detail in your question. You press run button. Thus, you must be using an IDE.
run
You cannot use execute in IDEs - it is an sql*plus command. It might work in Oracle SQL Developer though, but I wouldn't use it there anyway;
execute
sql*plus
Try
begin exam; end;