Microchip Technology SW006022-1N Data Sheet

Page of 338
MPLAB
®
 XC16 C Compiler User’s Guide
DS52071B-page 218
 2012 Microchip Technology Inc.
A.15 LIBRARY FUNCTIONS
Implementation-Defined Behavior for Library Functions is covered in section G.3.14 of 
the ANSI C Standard.
What is the null pointer constant to which the macro NULL expands? (ISO 7.1.5)
0.
How is the diagnostic printed by the assert function recognized, and what is the 
termination behavior of this function? (ISO 7.2)
The assert function prints the file name, line number and test expression, separated by 
the colon character (‘:’). It then calls the abort function.
What characters are tested for by the isalnum, isalpha, iscntrl, islower, isprint and 
isupper functions? (ISO 7.3.1)
What values are returned by the mathematics functions after a domain errors? 
(ISO 7.5.1)
NaN.
Do the mathematics functions set the integer expression errno to the value of the 
macro ERANGE on underflow range errors? (ISO 7.5.1)
Yes.
Do you get a domain error or is zero returned when the fmod function has a second 
argument of zero? (ISO 7.5.6.4)
Domain error.
TABLE A-5:
CHARACTERS TESTED BY IS FUNCTIONS
Function
Characters tested
isalnum
One of the letters or digits: isalpha or isdigit.
isalpha
One of the letters: islower or isupper.
iscntrl
One of the five standard motion control characters, backspace and alert: 
\f
, \n, \r, \t, \v, \b, \a.
islower
One of the letters ‘a’ through ‘z’.
isprint
A graphic character or the space character: isalnum or ispunct or 
space
.
isupper
One of the letters ‘A’ through ‘Z’.
ispunct
One of the characters: ! " # % & ' ( ) ; < = > ? [ \ ] * + , - . / : ^