wiki:library_stdlib

Version 3 (modified by laurent, 10 years ago) (diff)

--

The stdlib library

The stdlib.c and stdlib.h files define a set of useful functions that do not require a system call.

  • int atoi( char * string )

This function translate a character string to a signed integer. All characters (but the first) must be digits. For a negative value, the first character must be the '-' (minus) character.

  • double atof( char * string )

This function translate a character string to a double. Conversion stop at first non-numeric character (except a first '+' or '-' and one '.').

  • void* memcpy( void* dst, const void* src, unsigned int size )

This function copies size bytes from the src source buffer to the dst destination buffer.

  • void* memset( void* dst, int s, unsigned int size )

This function initializes size bytes in the dst destination buffer, with the value defined by (char)s.