Adithya Muddigunda
PRO
last year
Adithyacountry asked

Why does a C program start with #include <stdio.h>?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Adithya,

Good question.
The line #include tells the compiler to include the Standard Input Output library before compiling your program.

This library contains functions like printf() and scanf(). So if you're using printf to display something on the screen, you need to include stdio.h. Without it, the compiler won’t recognize those functions.

It’s like bringing in the tools your program needs to do input and output.

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

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