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

help me with the code for data validation in C
i need for both integer type n character type data
i tried using the isalpha() n other functions from the ctype.h library
but i m not gettin the logica correctly
please help me out with this
thanks

2006-09-29 02:53:03 · 3 answers · asked by sajju 1 in Computers & Internet Programming & Design

3 answers

The parameter should be inside the brackets ie

ch="A"
st="Lots of characters"
in=1234

boolean_result=ischar(ch)
boolean_result=isstring(st)
boolean_result=isnumeric(in)

2006-09-29 03:03:41 · answer #1 · answered by Anonymous · 0 0

use isdigit function instead of isalpha function for validation of two integers.

2006-09-29 03:05:03 · answer #2 · answered by iyiogrenci 6 · 0 0

Not really clear what you are asking, but have you tried isdigit() ? Or isalnum() ?

2006-09-29 03:01:18 · answer #3 · answered by Larry 6 · 0 0

fedest.com, questions and answers