need help converting string in double in one line!! lang C

Discussion in 'Java' started by pop, Jun 16, 2004.

  1. pop

    pop Guest

    i have a C exam for tomorrow and i have a copy of the last year exam
    i coudlnt resolve this question

    convert x to defo

    double x= 3.14159;

    char defo[20];

    i must respond in one line any idea ??? please help






    i know atoi but its the inverse operation ;-(
    pop, Jun 16, 2004
    #1
    1. Advertising

  2. pop

    Lee Weiner Guest

    In article <40d0b7d5$>, wrote:
    >i have a C exam for tomorrow and i have a copy of the last year exam
    >i coudlnt resolve this question
    >
    >convert x to defo
    >
    >double x= 3.14159;
    >
    > char defo[20];
    >
    >i must respond in one line any idea ??? please help
    >


    sprintf()

    Lee Weiner
    lee AT leeweiner DOT org
    Lee Weiner, Jun 16, 2004
    #2
    1. Advertising

  3. pop

    Liz Guest

    sprintf

    "pop" <> wrote in message
    news:40d0b7d5$...
    > i have a C exam for tomorrow and i have a copy of the last year exam
    > i coudlnt resolve this question
    >
    > convert x to defo
    >
    > double x= 3.14159;
    >
    > char defo[20];
    >
    > i must respond in one line any idea ??? please help
    >
    >
    >
    >
    >
    >
    > i know atoi but its the inverse operation ;-(
    Liz, Jun 16, 2004
    #3
  4. On Wed, 16 Jun 2004 23:12:57 +0200, pop wrote:

    >i have a C exam for tomorrow

    [...]
    and you are posting to the wrong group. Try comp.lang.c instead.
    Chiron Paixos, Jun 16, 2004
    #4
  5. pop

    Roedy Green Guest

    On Wed, 16 Jun 2004 23:12:57 +0200, pop <> wrote
    or quoted :

    >
    >i must respond in one line any idea ??? please help


    If you wanted to do the conversion in Java see
    http://mindprod.com/jgloss/converter.html


    C has different named methods. You will have to ask in a different
    newsgroup.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Jun 17, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.frontiernet.net
    Replies:
    6
    Views:
    1,102
    news.frontiernet.net
    Apr 16, 2004
  2. Sydex
    Replies:
    12
    Views:
    6,445
    Victor Bazarov
    Feb 17, 2005
  3. AviraM
    Replies:
    2
    Views:
    6,326
    Manish Pandit
    Sep 28, 2006
  4. Merciadri Luca
    Replies:
    4
    Views:
    796
  5. Replies:
    13
    Views:
    1,389
    Stuart
    Sep 23, 2012
Loading...

Share This Page