Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > need help converting string in double in one line!! lang C

Reply
Thread Tools

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

 
 
pop
Guest
Posts: n/a
 
      06-16-2004
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 ;-(
 
Reply With Quote
 
 
 
 
Lee Weiner
Guest
Posts: n/a
 
      06-16-2004
In article <40d0b7d5$(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
Liz
Guest
Posts: n/a
 
      06-16-2004
sprintf

"pop" <(E-Mail Removed)> wrote in message
news:40d0b7d5$(E-Mail Removed)...
> 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 ;-(



 
Reply With Quote
 
Chiron Paixos
Guest
Posts: n/a
 
      06-16-2004
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.


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      06-17-2004
On Wed, 16 Jun 2004 23:12:57 +0200, pop <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CheckBox in Column of JTable: Exception: java.lang.String cannot becast to java.lang.Boolean clusardi2k@aol.com Java 13 09-23-2012 02:44 PM
replace double inverted commas into slash double inverted commas in string AviraM Java 2 09-28-2006 06:19 PM
Converting double to string in 7e100 format Pudu Java 8 04-15-2006 04:13 AM
newbie: Converting DOUBLE to STRING =?Utf-8?B?Y2hhcmxpZXdlc3Q=?= ASP .Net 16 08-03-2005 12:19 PM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM



Advertisments