判断char类型的变量c1是否为数字字符的正确表达式为
A: (c1>=0)&&(c1<=9)
B: (c1>=’0’)&&(c1<=’9’)
C: ‘0’<=c1<=’9’
D: (c1>=’0’)||(c1<=’9’)
A: (c1>=0)&&(c1<=9)
B: (c1>=’0’)&&(c1<=’9’)
C: ‘0’<=c1<=’9’
D: (c1>=’0’)||(c1<=’9’)
举一反三
- 判断char类型的变量c1是否为数字字符的正确表达式为( )。 A: (c1>=0)&&(c1<=9) B: (c1>=’0’)&&(c1<=’9’) C: ‘0’<=c1<=’9’ D: (c1>=’0’)||(c1<=’9’)
- 判断字符型变量c1是否为数字字符的正确表达式为 A: '0'<=c1<='9' B: ('9'>=c1)&&('0'<=c1) C: (c1<='9')||(c1>='0') D: (c1>='9')&&(c1<='0')
- 判断char类型的变量c1是否为数字字符的正确表达式为 ( ) A: (c1>;=0)&&(c1<;=9) B: (c1>;= '0 ')&&(c1<;= '9') C: '0'<;=c1<;= '9 ' D: (c1>;= '0 ')||(c1<;= '9 '
- 判断字符型变量c1是否为数字字符的正确表达式为 A: '0'<;=c1<;='9' B: ('9'>;=c1)&&('0'<;=c1) C: (c1<;='9')||(c1>;='0') D: (c1>;='9')&&(c1<;='0')
- 判断字符型变量c1是否为数字字符的正确表达式为 A: '0'<=c1<='9' B: ('9'>=c1)&&('0'<=c1) C: (c1<='9')||(c1>='0') D: (c1>='9')&&(c1<='0')