Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   doubt about printf newbie (http://www.go4expert.com/forums/doubt-printf-newbie-t10120/)

Juan Luis 18Apr2008 22:59

doubt about printf newbie
Hi, i hope you can help me to understand why the following program works even though i did not include the "#include<cstdio>"

int main()
printf("hello world");

Is it because iostream already includes printf??? or what's going on?

atul.sharma12 23May2008 17:37

Re: doubt about printf newbie
iostream is a header file which is used for input/output in the C++ programming language. It is part of the C++ standard library. The name stands for Input/Output Stream.

In C++ and its predecessor, the C programming language, there is no special syntax for streaming data input or output. Instead, these are combined as a library of functions. Like the cstdio header inherited from C's stdio.h, iostream provides basic input and output services for C++ programs.

Hope this will help!!!!!

All times are GMT +5.5. The time now is 19:30.