English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am shamed to ask . umm please could someone give me a function that can check a string if it have only numbers or only litters and if it does take any parameters , i really can't remember any one now !

and i need a function that can convert a string to integers please .

many thanks for you all

2006-11-03 06:26:07 · 2 answers · asked by Alone 4 in Computers & Internet Programming & Design

2 answers

for conversion use the stdlib.h libraary it has a function called atoi()

prototype
int atoi ( const char * string );


for digit checking


header ctype.h

prototype
int isdigit(int Character);

good luck

2006-11-03 07:42:41 · answer #1 · answered by Anonymous · 1 0

use inbuilt function defined in string.h

2006-11-03 06:52:04 · answer #2 · answered by manu r 1 · 0 0

fedest.com, questions and answers