Microchip Technology SW006021-1N Manual Do Utilizador
MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 354
2012 Microchip Technology Inc.
PUTS
Synopsis
#include <stdio.h>
int puts (const char * s)
Description
The
puts()
function writes the string s to the stdout stream, appending a newline. The
null character terminating the string is not copied.
Example
#include <stdio.h>
void
main (void)
{
puts("Hello, world!");
}
See Also
fputs()
, gets(), freopen(), fclose()
Return Value
EOF is returned on error; zero otherwise.
QSORT
Synopsis
#include <stdlib.h>
void qsort (void * base, size_t nel, size_t width,
int (*func)(const void *, const void *))
Description
The
qsort()
function is an implementation of the quicksort algorithm. It sorts an array
of
nel
items, each of length
width
bytes, located contiguously in memory at
base
. The
argument
func
is a pointer to a function used by
qsort()
to compare items. It calls
func
with s to two items to be compared. If the first item is considered to be greater
than, equal to or less than the second then
func
should return a value greater than
zero, equal to zero or less than zero respectively.