I’ve installed NetBeans 7.0.1 today When I try to execute C program with “scanf” in it it’s giving strange errors
This is what I wrote:
It keeps on running until I enter something in the output console.

After entering its shows the printf statement and shows “RUN FAILED”

Can anybody tell me what should I do to make this right?
Your printf is not getting flushed so it is not showing until the program ends.
You are not returning a value from main() explicitly, so the result of scanf() is being returned, which is 1 which is interpreted as program failure.