Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>atol</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
atol


Usage

   #include <stdlib.h>
   long atol(const char *nptr);

   ANSI

Description

   Converts the string pointed to by nptr into a long. The string may have
   leading spaces, tabs, and + or -. Conversion stops on the first
   unrecognized character. If there are no recognized characters, the result
   is 0.

Example 

   #include <stdio.h>
   #include <stdlib.h>

   int main()

   {
       printf("atol function = %ld\n",atol("1234 String"));
       return EXIT_SUCCESS;
   }

Return Value

   Returns the long value derived from converting the string. Zero is
   returned if the input string does not have any recognizable characters.

See Also

   atof, atoi, ecvt, fcvt, strtol, strtod, scanf



See Also: atof atoi ecvt fcvt strtol strtod scanf

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson