#include iostream in C?


Question

In C++ we always put the following at the top of the program

#include <iostream>

What about for C?

1
12
12/4/2009 1:07:42 AM

Accepted Answer

Well, this is called the standard I/O header. In C you have:

#include <stdio.h>

It's not an analog to <iostream>. There is no analog to iostream in C -- it lacks objects and types. If you're using C++, it's the analog to <cstdio>.

See also this fantastic question and its answer,

24
11/24/2017 10:38:03 PM

iostream is a C++ library for input-output. The C equivalent would be stdio.h


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon