Afficher un message
Vieux 14/04/2008, 04h17   #5
Barry Schwarz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Problem with atoi and strlod

On Sun, 13 Apr 2008 09:50:50 -0700 (PDT), Sanchit
<sanchitgupta.1@gmail.com> wrote:

>#include<stdio.h>
>#include<stdlib.h>
>
>int main()
>{
> double ans;
> ans = strtod("25", NULL);
> printf("ans = %d\n",ans);
>
>}
>
>OUTPUT :
>ans = 0
>
>EXPECTED OUTPUT
>ans = 25
>
>Can anyone please explain this... Else tell me an alternative for
>converting string to int.


You some objection to strtol?


Remove del for email
  Réponse avec citation
 
Page generated in 0,05507 seconds with 9 queries