r/C_Programming • • Sep 19 '26

Does this is right?

(I am student just entering into 1st year of engineering and also i am new to this sub so if i do anything wrong pls correct me)

I just bought a book " programming in ANSI C"and start to read that i have some doubts in that can anyone explain that

  1. I read this line i did not get this

#include <stdio.h>

at the beginning of all programs that use any input/output library functions. However, this is not necessary for the functions printf and scanf which have been defined as a part of the C language

Can anyone explain this statement correct or not

0 Upvotes

24 comments sorted by

View all comments

Show parent comment

2

u/flyingron Sep 20 '26

You’re wrong. This has been er been a requirement in C even. Score the requirement for explicit declarations. The only thing that generally saves you is that most implementations make it the responsibility of the caller to allocate space for both the parameters and return value.