Tanvi Salve
last year
Tanvicountry asked

Why do we use <stdio.h>?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Tanvi,

We use #include because it gives your program access to standard input and output functions like printf() and scanf().

Example:

#include 

int main() {
    printf("Hello");
    return 0;
}

Without stdio.h, the compiler may not recognize printf() properly.

If you have more questions, I am here to help 😊

C
This question was asked as part of the Learn C Programming course.