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?
Yes, I have same problem with you, and the solutions in answers are not working on my machine. After searching, I understand that this problem is about Netbean's internal terminal/console section. The internal console is not able to run scanf function. So use external terminal for your project. To do this:
That is all.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With