scanf() Use in C Language:
(1) scanf() is used for entering input values.
(2) Sample C language code and its output, as shown:
printf(“Enter the value: “);
printf(“Entered value is: %d”, n);
(3) After that go to the “Build” menu and select the “Build” option for publishing the code as shown.
(4) After building the code, press the “Run” button, as shown.
(5) After pressing the “run” button, the output screen is opened, then enter the number and press the “Enter” button (remember that entered number must be an integer because we have declared variable “n” which is an integer) as shown.
(6) After entering the value, the system gives the output value, as shown.