Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Programming/Code/Standard C Library/Functions/atol

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

atol #include <cstdlib> long atol( const char *str ); The function atol() converts str into a long, then returns that value. atol() will read from str until it finds any character that should not be in a long. The resulting truncated value is then converted and returned. For example, x = atol( "1024.0001" ); results in x being set to 1024L. Related topics atof - atoi - strtod(Standard C I/O) sprintf