
UM017105-0511 Standard Functions
Zilog Developer Studio II – ZNEO™
User Manual
413
calloc
Allocates space for an array of nmemb objects, each of whose size is size. The space is
initialized to all bits zero.
Synopsis
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
Returns
A pointer to the start (lowest byte address) of the allocated space. If the space cannot be
allocated, or if nmemb or
size is zero, the calloc function returns a null pointer.
Example
char *buf;
buf = (char*)calloc(40, sizeof(char));
if (buf != NULL)
/*success*/
else
/*fail*/
ceil, ceilf
Computes the smallest integer not less than x.
Synopsis
#include <math.h>
double ceil(double x);
float ceilf(float x);
Returns
The smallest integer not less than x, expressed as a double for ceil and expressed as a
float for ceilf.
Example
double y=1.45;
double x;
x=ceil(y);
Comentarios a estos manuales