How can I validate the user input by using scanf. Right now I have something like this, but doesn\'t work.
NOTE: I have the atoi just to validate that the scanf vali
"buf" needs to be a pointer. It looks like you are passing by value.