Why we use %d in scanf() Function?
You can, they are the same for printf, but there is a slight difference with scanf. Read this; https://www.google.com/amp/s/www.geeksforgeeks.org/difference-d-format-specifier-c-language/amp/
%d is a format specifier that means you want to receive an integer (decimal/base 10).
Thanks bro ❤
Why don't we use %i instead?
we use %d to scan the entered value, and that value should be an int.