Functions

Discussion in 'C' started by arvind_khadri, Sep 5, 2007.

  1. arvind_khadri

    arvind_khadri New Member

    Joined:
    Sep 4, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    how exactly can we deine a function...(define as in english not the coding part)
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    In C/C++ a function accepts 0 or more arguments and performs work with them. It often, but not always, returns a value. Unlike inline code, a function can be invoked from any point in the program. When it has done it's job, execution will resume from the point at which it was called.

    Consider y = sin (x). sin is the function, x is the argument, and y is the return. The work the function does is to calculate the sin of the argument and return the result.
     
  3. arvind_khadri

    arvind_khadri New Member

    Joined:
    Sep 4, 2007
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    0
    ok...then wats an inline code...eg is a codin written in a for loop a inline code
     

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