+ 1
Which type used stdio.h function
studio.h
14 Antworten
+ 3
I'm assuming you think stdio.h is a function. It's not, it's a library containing functions.
+ 3
Ben Allen (Njinx) It's actually just a header. The header is an _interface_ to the _implementation_ (which is often already compiled). Just a technicality, but important for exams/interviews :)
+ 3
nonzyro Yes you're correct, stdio.h is a header, but it links many files together containing functions.
+ 3
nonzyro It is a library, it deals with IO.
http://www.cplusplus.com/reference/cstdio/
+ 3
Ben Allen (Njinx) It's badly worded. Let me explain:
foo is a library,
foo.h is a header for that library, it provides an interface.
Source:
https://www.gnu.org/software/m68hc11/examples/stdio_8h-source.html
^ Contains no functions, just declarations.
stdio.h = header.
stdio = library (part of C standard library).
+ 3
nonzyro I understand that stdio.h is just a header file, but I assume he's asking about stdio as a whole, not just the header file.
+ 3
Ben Allen (Njinx) Oh, maybe I got the wrong idea because he said "stdio.h". People can be confusing. TBH, I'm not sure he even knows what he's asking :P
+ 3
nonzyro "TBH, I'm not sure he even knows what he's asking :P". Yup, that about sums up SoloLearn's discussion section 😂😂
+ 2
No, not studio.
stdio.h
It's a header for STanDard In/Out functions, hence the name, like printf().
You can check the site cppreference or cplusplus for a list of all functionality from this header.
+ 2
I know but how to declare or initialize and use .??
+ 2
You include the header:
For C:
#include <stdio.h>
For C++:
#include <cstdio>
Then use functions as per spec.
+ 2
thanks to help me ...
+ 2
Ben Allen (Njinx) It's not a library though. It's a part of the C Standard Library.
+ 2
stdio.h is a library for input and output . It contains the fonctions printf scanf getchar gets fgets fputs ...