In scanf() function the variables that are receiving values should be passed by their addresses. All arguments should be pointers to variables.
To read an integer:
To read a string:
Since string is already a pointer & is not required.