Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What does scanf mean in C language? Why is it sometimes written with %f, sometimes with %e, %lf, %c, etc.
What does scanf mean in C language? Why is it sometimes written with %f, sometimes with %e, %lf, %c, etc.

scanf is an input function in C language. It means that when you enter a value from the keyboard and press Enter, it will save the value you entered to the computer. As for why %f is written later, %e.%lf,%c depends on the object of scanf.

For float, double, and char, use %f, %e, and %c respectively