Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Comp sci (C programming)

  1. Feb 2, 2010 #1
    Just some basic questions i have about function prototypes (functions)
    What's an example of a code which has no parameters? ie: double func(void)
    what is the purpose if the thing doesn't take in parameters? also, what if there is keyboard input and screen input what does that mean in the function prototype? does it usually happen? whats the point of having a function if it doesn't RETURN any useful stuff to main? or prints nothing on the screen?
  2. jcsd
  3. Feb 2, 2010 #2
    A function can still do lots of things, even without parameters and returning a value. It will execute whatever code is in the function.

    In this way it's basically a Procedure.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook