doubt about printf newbie

Discussion in 'C' started by Juan Luis, Apr 18, 2008.

  1. Juan Luis

    Juan Luis New Member

    Joined:
    Apr 18, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi, i hope you can help me to understand why the following program works even though i did not include the "#include<cstdio>"

    #include<iostream>
    int main()
    {
    printf("hello world");
    }


    Is it because iostream already includes printf??? or what's going on?
     
  2. atul.sharma12

    atul.sharma12 New Member

    Joined:
    May 21, 2008
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    S/W Engg.
    Location:
    This Planet only!!!!
    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!!!!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice