C – atol() function

Prev     Next

  • atol() function in C language converts string data type to long data type. Syntax for atol() function is given below.

long int atol ( const char * str );

  • “stdlib.h” header file supports all the type casting functions in C language.

Example program for atol() function in C:

Output:

Value = 100000000000

Other inbuilt typecast functions in C programming language:

  • Typecasting functions in C language performs data type conversion from one type to another.
  • Click on each function name below for description and example programs.
Typecast function Description
atof() Converts string to float
atoi() Converts string to int
atol() Converts string to long
itoa() Converts int to string
ltoa() Converts long to string

Prev     Next





Share this website !!!
Facebook Twitter Linkedin

Close
We Support JALLIKATTU !!!
We Support JALLIKATTU!
By Fresh2Refresh.com
Show Your Support as well. Thanks!