This function of stdlib will convert a string to a long integer.
Usage of atol():
long int atol ( const char * str );
Parameters:
C string str interpreting its content as a integer. White-spaces are discarded until the first non-whitespace character is found.
Return value:
More »
Posted in C Reference stdlib.h Functions |
This function of stdlib.h will return the quotient and remainder of the division of numerator by denominator integers n,d.
Usage of div():
div_t div ( int n, int d );
Parameters:
n = numerator
d = denominator
Return value:
More »
Posted in C Reference stdlib.h Functions |
Usage of acos():
double acos(double x);
Parameters:
The value x must be within the range of -1 to +1 (inclusive).
Return value:
The returned value is in the range of 0 to pi (inclusive).
Source code example of acos():
More »
Posted in C Reference math.h Functions |
The null pointer macro (NULL) is generally used to signify that a pointer does not point to a object.
Posted in C Reference time.h Functions |
The macro constant expression CLOCKS_PER_SEC specifies the relation between a clock tick and a second (clock ticks per second).
If you divide a count of clock ticks by this expression you get the number of seconds.
The CLK_TCK is an obsolete alias of this macro.
For a usage example take a look at the clock page.
Posted in C Reference time.h Functions |
The time structure tm contains a calendar date and time which are broken down into its components.
Structure containing a calendar date and time broken down into its components.
The structure contains nine members of type integer: More »
Posted in C Reference time.h Functions |
The time type (time_t) is capable of representing times and it also support arithmetical operations.
The time function will return this type. It is also used by some other functions of the time.h header file.
It represents the number of seconds elapsed since 00:00 hours, Jan 1, 1970 UTC. Also called EPOCH time (Unix time stamp). It is widely implemented in the C libraries across ALL platforms.
Posted in C Reference time.h Functions |
The unsigned integral type (size_t) corresponds to the integral data type returned by the language operator sizeof. It is used in (among others) in the time.h header file as an unsigned integral type.
In the header file time.h it is used by the function strftime as the type of its parameter maxsize. It is also used as the return type of this function. It is used to express counts of characters.
Posted in C Reference time.h Functions |
The clock type represent clock ticks counts and can be used for arithmetical operations.
The clock type clock_t is returned by the clock function of time.h header file.
It represents the number of clock ticks since the program was started.
Posted in C Reference time.h Functions |
Usage of strftime():
size_t strftime ( char * ptr_dest, size_t maxsize, const char * format, const struct tm * ptr_time );
Parameters:
ptr_dest is a pointer to the destination array where the resulting C string is copied too.
The maxsize contains the maximum number of characters to be copied to ptr_dest. More »
Posted in C Reference time.h Functions |