Table Of Contents

ANSI C Library Function Reference

Last Modified: September 14, 2016

The following table lists ANSI C Library functions available in LabVIEW. Clicking a link in this table opens a topic in the LabWindows/CVI Help in a new browser tab.

Function Description
_getmbcp Returns the code page currently used by the operating system.
_ismbblead Returns TRUE if its input byte is a valid lead byte in the current code page.
_mbsbtype Determines the type of the byte in the context string at the given offset.
_mbscat Appends a copy of a source string to the end of a target string.
_mbschr Locates the first occurrence of the specified character in a string.
_mbscmp Compares two NUL-terminated strings.
_mbscpy Copies a source string, including the terminating ASCII NUL byte, into a target string.
_mbscspn Locates the position of the first character in a string that is from a specified set of characters.
_mbsdec Moves a character pointer to the previous character in a multibyte character string.
_mbsicmp Compares two NUL-terminated strings.
_mbsinc Moves a character pointer in a multibyte character string to the next character.
_mbslen Returns the length of the specified string up to, but not including, the terminating ASCII NUL byte.
_mbsnbcat Appends a specified number of bytes from a source string to the end of a target string.
_mbsnbcmp Compares a specified number of bytes from two NUL-terminated strings.
_mbsnbcpy Copies a specified number of bytes from a source string to a target string.
_mbsnbicmp Compares not more than a specified amount of bytes of two NUL-terminated strings.
_mbspbrk Locates the first occurrence in a string of any character from the specified character set.
_mbsrchr Locates the last occurrence of the specified character in a given string.
_mbsspn Returns the length in bytes of the initial segment of a string that contains only characters from the specified set of characters.
_mbsstr Locates the first occurrence of a sequence of characters, excluding the terminating ASCII NUL byte, in a string.
_mbstok Breaks a string into tokens, which are separated by one or more characters from the specified set of delimiters.
_putenv Adds or replaces an entry in the environment list of the host environment.
abs Computes the absolute value of the specified integer input value.
acos Computes the principal value of the arc cosine of the specified argument.
alloca Allocates space on the stack for an object of specified size.
asctime Takes a date and time stored in a struct tm and converts it into a string.
asin Computes the principal value of the arc sine of the specified argument.
atan Returns the arc tangent of the specified argument.
atan2 Computes the principal value of the arc tangent of (yValue/xValue) using the signs of both arguments to determine the quadrant of the return value.
atof Converts the initial portion of a string to a double representation.
atoi Converts the initial portion of a string to an int representation.
atol Converts the initial portion of a string to a long int representation.
atoll Converts the initial portion of a string to a long long int representation.
bsearch Searches an array of objects for an element that matches a specified key.
calloc Allocates memory space for an array of elements in which an element's size is specified by elementSize and total number of elements is specified by number_ofElements.
ceil Computes the smallest integer value not less than the specified argument by rounding the input value up to the next highest integer.
clearerr Clears the end-of-file and error indicators for the specified stream.
clock Returns the number of system clock cycles that have occurred since the program started executing.
close Flushes the system buffers for the specified file handle and closes the associated file.
cos Computes the cosine of the specified argument.
cosh Computes the hyperbolic cosine of the specified argument.
ctime Converts the current time to a human-readable string.
difftime Computes the difference between two calendar times.
div Divides numerator by denominator.
eof Tests the end-of-file indicator for the specified handle.
exp Computes the exponential function of the specified argument.
fabs Computes the absolute value of a double.
fclose Flushes the specified I/O stream and closes the associated file.
fdopen Obtains a pointer to a buffered I/O stream from a file handle returned by the open or sopen (Windows only) functions.
feof Tests the end-of-file indicator for the specified stream.
ferror Tests the error indicator for the specified stream.
fflush Flushes the I/O buffer of the specified stream.
fgetc Reads the next character from the specified input stream and advances the associated file position indicator.
fgetpos Obtains the current value of the file position indicator for the specified stream.
fgets Reads characters from the specified input stream into a lineBuffer until end-of-file is encountered, a newline character is read, or (number_ofChars - 1) characters are read.
floor Computes the largest integer value not greater than the specified argument by rounding the input value down to the next lowest integer.
fmod Computes the floating-point remainder of the division of two double values and returns the result.
fopen Opens the specified file according to the designated mode.
fprintf Writes output to the specified stream according to format specifiers in formatString.
fputc Writes the specified character to the an output stream and advances the file position indicator.
fputs Writes a string (not including a terminating ASCII NUL byte) to the specified output stream.
fread Reads a block of data from the specified input stream then stores it in the specified buffer.
free Causes the space pointed to by memBlockPointer to be deallocated.
freopen Attempts to close the file that is associated with oldStream, opens a file and associates it with the I/O stream that is pointed to by oldStream, and clears error and end-of-file indicators for the I/O stream.
frexp Splits a floating-point value into two parts: the mantissa (a normalized fraction with magnitude in the interval [0.5,1) or zero) and the exponent (an integral power of two).
fscanf Reads input from the specified stream and converts it into a series of values according to the specifications of the formatting string.
fseek Sets the file position indicator for the specified stream.
fsetpos Sets the file position indicator for the specified stream according to the value obtained from an earlier call to fgetpos.
ftell Returns the current value of the file position indicator for the specified stream.
fwrite Writes a block of data to the specified output stream.
getc Reads the next character from the specified input stream and advances the file position indicator.
getenv Searches for the environment string that matches the specified environment name and returns the associated value to the string.
gmtime Takes a calendar time, breaks it into its component parts, and stores the result in a struct tm.
isalnum Tests to see if a character is alphanumeric (a-z, A-Z, 0-9).
isalpha Tests to see if a character is alphabetic (a-z, A-Z).
iscntrl Tests to see if a character is a control character (any character whose value is from 0 to 31).
isdigit Tests to see if a character is a decimal digit (0-9).
isgraph Tests to see if a character is a printable, non-whitespace character.
islower Tests to see if a character is a lowercase alphabetic character (a - z).
isprint Tests to see if a character is among printable characters, including whitespace.
ispunct Tests to see if a character is a punctuation character, which is any printable character that is neither whitespace nor alphanumeric.
isspace Tests to see if a character is one of the standard whitespace characters.
isupper Tests to see if a character is an uppercase alphabetic character (A - Z).
isxdigit Tests to see if a character is a hexadecimal digit (0-9, A - F, a - f).
labs Computes the absolute value of the specified long integer input value.
ldexp Multiplies a floating-point number by an integral power of two.
ldiv Computes the integral quotient and remainder of the division of numerator by denominator.
llabs Computes the absolute value of the specified long long integer input value.
lldiv Computes the integral quotient and remainder of the division of numerator by denominator.
localeconv Queries the current locale for format parameters for numeric quantities.
localtime Takes a calendar time, breaks it into its component parts, adjusts it to the local time zone, and stores the result in a struct tm.
log Computes the natural logarithm of the specified argument.
log10 Computes the base-ten logarithm of the specified argument.
longjmp Restores the environment saved by the most recent calling of setjmp.
lseek Sets the file position indicator for the specified file handle.
malloc Allocates space for an object of specified size.
mblen Determines the number of bytes contained in the specified multibyte character.
mbstowcs Converts a sequence of multibyte characters into their corresponding wide character codes, storing only a specified number of codes.
mbtowc Determines the number of bytes that are contained in the specified multibyte character and the code that corresponds to that multibyte character.
memchr Locates the first occurrence of the specified character in a given memory block.
memcmp Compares two blocks of memory.
memcpy Copies a specified number of bytes from a source buffer to a target buffer.
memmove Copies a specified number of bytes from a source buffer to a target buffer.
memset Copies a specified value into a memory block.
mktime Converts a local date and time represented in a struct tm into a calendar time value.
modf Breaks a double value into its integral and fractional parts, each of which will have the same sign as the argument.
open Opens a file with the specified name according to the operation flags and returns a handle to the opened file.
pow Raises the input value to the designated power and returns the result.
putc Writes the specified character to an output stream at the position of the associated file position indicator.
qsort Sorts an array of elements into ascending order according to a comparison function written by the user.
raise Sends the specified signal to the executing program.
rand Computes a pseudorandom integer in the range 0 to RAND_MAX.
read Reads a block of data from the specified file handle and stores this data in the specified buffer.
realloc Changes the size of a memory block that has been previously allocated while preserving the contents.
remove Causes the specified file or empty directory to be made inaccessible by that name.
rename Causes the file or directory specified by oldFileName to be known by the name given in newFileName.
rewind Sets the file position indicator for the specified stream to the beginning of the file.
setbuf Specifies how to buffer the I/O stream.
setjmp Stores the current calling environment for later use by longjmp.
setlocale Modifies the specified category of the program's locale.
setvbuf Specifies how to buffer the I/O stream.
sin Computes the sine of the specified argument.
sinh Computes the hyperbolic sine of the specified argument.
snprintf Writes output to the specified string according to format specifiers in formatString; a null character is written at the end of the characters written.
sopen Opens a file with the specified name according to the operation and share flags.
sprintf Writes output to the specified string according to format specifiers in formatString; a null character is written at the end of the characters written.
sqrt Computes the nonnegative square root of the specified argument.
srand Uses the argument as a seed for a new sequence of pseudorandom numbers to be returned by subsequent calls to rand.
sscanf Converts input from the specified source string into a series of values according to the specifiers in formatString.
strcat Appends a copy of a source string to the end of a target string, including the terminating ASCII NUL byte.
strchr Locates the first occurrence of the specified character in a string.
strcmp Compares two NUL-terminated strings.
strcoll Compares two NUL-terminated strings, both interpreted as appropriate to the LC_COLLATE category of the current locale.
strcpy Copies a source string including the terminating ASCII NUL byte into a target string.
strcspn Locates the position of the first character in a string that is in a specified set of characters.
strerror Maps the specified error ID number from the errno global variable to an error message string.
strftime Takes a date and time stored in a time struct and generates a NUL-terminated ASCII string that contains the time and date information in a format specified by a format string.
stricmp Compares two NUL-terminated strings, based on the value of the characters interpreted as an unsigned char.
strlen Computes the length of the specified string, up to but not including the terminating null character.
strncat Appends a specified number of characters from a source string to the end of a target string.
strncmp Compares a specified number of characters of two NUL-terminated strings.
strncpy Copies characters from a source string to a target string until it reaches the specified number of characters or an ASCII NUL byte.
strnicmp Compares a specified number of characters of two NUL-terminated strings based upon the value of the characters in the strings interpreted as unsigned chars.
strpbrk Locates the first occurrence in a string of any character in the specified character set.
strrchr Locates the last occurrence of the specified character in a string.
strspn Locates the position of the first character in a string that is not in a specified set of characters.
strstr Locates the first occurrence of a sequence of characters excluding the terminating ASCII NUL byte in a string.
strtod Converts the initial portion of a string to double representation.
strtok Breaks a string into tokens, which are sequences of contiguous characters separated by one or more characters from the specified set of delimiters.
strtol Converts the initial portion of a string to a long int representation with a specified base.
strtoll Converts the initial portion of a string to a long long integer representation with a specified base.
strtoul Converts the initial portion of a string to an unsigned long int representation with a specified base.
strtoull Converts the initial portion of a string to an unsigned long long integer representation with a specified base.
strxfrm Transforms the specified number of characters, including the terminating ASNII NUL byte, from a source string to a target string.
system Starts running a program and waits for it to exit.
tan Computes the tangent of the specified argument.
tanh Computes the hyperbolic tangent of the specified argument.
time Determines the current calendar time (the number of seconds since January 1, 1900 Coordinated Universal Time (UTC)).
tmpfile Creates a temporary binary file that will be automatically deleted when the user closes the file or terminates the program.
tmpnam Generates a string that is a valid filename and that is not the same as the name of an existing file. This function will generate a different string each time it is called, up to TMP_MAX times.
tolower Converts an uppercase letter to a lowercase letter and returns the converted character.
toupper Converts a lowercase letter to an uppercase letter and returns the converted character.
ungetc Will push a single character back into the specified input stream; subsequent reads on that stream will return pushed-back characters in the reverse order of their pushing.
vfprintf Writes output to the specified stream according to format specifiers in formatString.
vfscanf Reads input from the specified stream and converts it into a series of values according to the specifications of the formatting string.
vsnprintf Writes output to the specified string according to format specifiers in formatString.
vsprintf Writes output to the specified string according to format specifiers in formatString.
vsscanf Converts input from the specified source string into a series of values according to the specifiers in formatString.
wcslen Returns the length of the specified string up to, but not including, the terminating ASCII NUL byte.
wcstombs Converts a sequence of wide character codes into a sequence of the corresponding multibyte characters.
wctomb Determines the number of bytes needed to represent the multibyte character corresponding to the specified wide character code.
write A data block stored in the specified buffer is written to the specified file handle.

Recently Viewed Topics