+ 1

Which type used stdio.h function

studio.h

1st May 2018, 2:37 PM
Amit Yadav
Amit Yadav - avatar
14 Respuestas
+ 3
I'm assuming you think stdio.h is a function. It's not, it's a library containing functions.
1st May 2018, 11:29 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 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 :)
2nd May 2018, 11:05 PM
non
+ 3
nonzyro Yes you're correct, stdio.h is a header, but it links many files together containing functions.
2nd May 2018, 11:07 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 3
nonzyro It is a library, it deals with IO. http://www.cplusplus.com/reference/cstdio/
2nd May 2018, 11:14 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 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).
2nd May 2018, 11:39 PM
non
+ 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.
2nd May 2018, 11:43 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 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
2nd May 2018, 11:51 PM
non
+ 3
nonzyro "TBH, I'm not sure he even knows what he's asking :P". Yup, that about sums up SoloLearn's discussion section 😂😂
2nd May 2018, 11:53 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 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.
1st May 2018, 3:30 PM
non
+ 2
I know but how to declare or initialize and use .??
1st May 2018, 3:31 PM
Amit Yadav
Amit Yadav - avatar
+ 2
You include the header: For C: #include <stdio.h> For C++: #include <cstdio> Then use functions as per spec.
1st May 2018, 5:11 PM
non
+ 2
thanks to help me ...
2nd May 2018, 9:02 AM
Amit Yadav
Amit Yadav - avatar
+ 2
Ben Allen (Njinx) It's not a library though. It's a part of the C Standard Library.
2nd May 2018, 11:12 PM
non
+ 2
stdio.h is a library for input and output . It contains the fonctions printf scanf getchar gets fgets fputs ...
20th Oct 2020, 11:53 AM
Ousmane Leye
Ousmane Leye - avatar