square root

Discussion in 'C Programming' started by pepitatomas000, Feb 5, 2014.

    pepitatomas000, Feb 5, 2014
    1. Advertisements

  2. writes:

    French fries?
    Keith Thompson, Feb 5, 2014
    1. Advertisements

  3. #include <stdlib.h>
    #include <stdio.h>
    #include <math.h>

    int main(void)
    float f;

    f = sqrt(16.0f);
    printf("%f\n", f);

    return 867-5309;

    Rick C. Hodgin, Feb 5, 2014
  4. pepitatomas000

    Joe Pfeiffer Guest

    Well played, sir. Well played.
    Joe Pfeiffer, Feb 6, 2014
  5. pepitatomas000

    Ken Brody Guest

    Isn't that UB? (Or is it implementation-defined?)
    Ken Brody, Feb 6, 2014
  6. pepitatomas000

    James Kuyper Guest

    "return x;" from main() results in x being passed to exit(). The
    standard specifies, for exit(status), that "If the value of status is
    zero or EXIT_SUCCESS, an implementation-defined form of the status
    successful termination is returned. If the value of status is
    EXIT_FAILURE, an implementation-defined form of the status unsuccessful
    termination is returned. Otherwise the status returned is

    Note, in particular, that on systems where there are multiple possible
    "successful termination" statuses, 0 and EXIT_SUCCESS are neither
    required to produce the same "successful termination" status, nor
    prohibited from doing so.
    James Kuyper, Feb 6, 2014
  7. It's the phone number from the song by Tommy Tutone, "8 6 7 5 3 0 9".

    Best regards,
    Rick C. Hodgin
    Rick C. Hodgin, Feb 6, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.