www.delorie.com/djgpp/doc/libc/libc_784.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

strtoul

Syntax

 
#include <stdlib.h>

unsigned long strtoul(const char *s, char **endp, int base);

Description

This is just like strtol (see section strtol) except that the result is unsigned.

Return Value

The value.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
printf("Enter a number: "); fflush(stdout);
gets(buf);
char *bp;
printf("The value is %u\n", strtoul(buf, &bp, 0));


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004