What's the function of printf?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pooria taheri
    New Member
    • Oct 2012
    • 1

    #1

    What's the function of printf?

    what the function of this string....
    printf("%d",pri ntf(test));

    i know the result,i checked it in practices but i havent any idea about what really happended,pleas e answer me and i will owe you one ...tnx all
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    printf returns the number of characters displayed. So the outer printf displays the number of characters displayed by the inner printf.

    Notice the %d on the outer printf. A %d is used to display an int. In this case the int returned by the inner printf.

    This is a very common programming style.

    Comment

    Working...