Download Manual - Digi-Key
Transcript
Library Functions
ATOI
Synopsis
#include <stdlib.h>
int atoi (const char * s)
Description
The atoi() function scans the character string passed to it, skipping leading blanks and reading an
optional sign. It then converts an ASCII representation of a decimal number to an integer.
Example
#include <stdlib.h>
#include <stdio.h>
void
main (void)
{
char buf[80];
int i;
gets(buf);
i = atoi(buf);
printf("Read %s: converted to %d\n", buf, i);
}
See Also
xtoi(), atof(), atol()
Return Value
A signed integer. If no number is found in the string, 0 will be returned.
156
Related documents
019P Manual - Digi-Key
032 Manual - Digi-Key
HI-TECH C for PIC10/12/16 User`s Guide
Manual - IS MU
The GSTOOL Manual - BSI
HI-TECH C for PIC10/12/16 User's Guide
Chameleon PIC User Manual Ver 1 ().
MVME5100 Single Board Computer Programmer`s Reference
Attachment to deliverable D4.2: User Manual
Installation Manual Privacy Wall & Decorative Panel Kit
Datasheet - Mouser Electronics
Allen-Bradley OS-9 Assembler-Linker