Convert A String To A Double, Int Or Long Int With atof(), atoi() or atol() | C Programming Tutorial

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Thank you for zooming in, it makes it so much easier

Aafro
Автор

Thank you for this. I'm looking for how to do the reverse which is converting like a long to string type

IHUMA_H
Автор

This is not really a "wholesome" resolution. The ato.() functions, while convenient and simple, can result in undefined behavior like failing to convert correctly or mistaking a hex number, etc. The strto.() family of functions are a lot safer albeit requiring three arguments (the string, a pointer to where in your input string the conversion stopped, and the base you wish to convert to.)

warplanner
Автор

hey am kinda new so i might ask something stupid b why the atof function need the char to have the *? like why char *double_test and not char double_test what does the * do?

lepen_macron
Автор

In long int value I gets a negative value..is there any solutions??

ajaynathms
Автор

Hello i have a doubt regarding the problem

RaselAhmed-ixee