December 2005
Beginner to intermediate
618 pages
20h 19m
English
imaxabs
Gives the absolute value of a number of the longest available integer type
#include <inttypes.h> intmax_timaxabs( intmax_tn)
The imaxabs() function is
the same as either labs() or
llabs(), depending on how many
bits wide the system’s largest integer type is. Accordingly, the
type intmax_t is the same as
either long or long long.
intmax_t quantity1 = 9182734;
intmax_t quantity2 = 1438756;
printf( "The difference between the two quantities is %ji.\n",imaxabs( quantity2 − quantity1 ));Read now
Unlock full access