scanf is the standard function which is used to take input from the user. scanf is also read formatted input from the device such as keyboards.