MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Practice
4.12: Comparing Characters And String Objects Quiz
«
Multiple Choice Questions
»
1
2
3
4
5
6
7
8
9
10
11
12
13
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is a upper-case letter.
0%
(x>='0' && x<='7')
0%
(x>='0' && x<='9')
0%
(x>='A' && x<='Z')
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
Assume that c is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if c is what is called a whitespace character (that is a space or a tab or a newline-- none of which result in ink being printed on paper).
0%
((x>='A' && x<='Z') || (x>='a' && x<='z'))
0%
!(c == ' ' || c== '\n' || c == '\t')
0%
!(x >= 'A' && x <='Z')
0%
(c == ' ' || c== '\n' || c == '\t')
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is a decimal digit (0-9).
0%
(x>='a' && x<='z')
0%
(x>='0' && x<='9')
0%
(x>='0' && x<='7')
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
What's the difference in ASCII value between '3' and '0'? (consult a table of ASCII values):
0%
3
0%
6
0%
4
0%
c == ' '
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is a lower-case letter.
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
0%
(x>='a' && x<='z')
0%
(x>='0' && x<='7')
0%
(x>='0' && x<='9')
Assume that c is a char variable that has been declared and already given a value . Write an expression whose value is true if (c == '\n')and only if c is an newline character .
0%
!(x >= 'A' && x <='Z')
0%
c == ' '
0%
(c == '\n')
0%
(c=='\t')
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is an octal (Base 8) digit (0-7).
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
0%
(x>='0' && x<='7')
0%
(x>='A' && x<='Z')
0%
(x>='0' && x<='9')
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is an hexadecimal (Base 16) digit (0-9 plus A-F or a-f).
0%
( ( x>='0' && x<='9') || ( x>='a' && x<='f' ) || ( x>='A' && x<='F') )
0%
((x>='A' && x<='Z') || (x>='a' && x<='z'))
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
0%
(x>='A' && x<='Z') || (x>='a' && x<='z') || (x>='0' && x<='9')
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is NOT a letter.
0%
((x>='A' && x<='Z') || (x>='a' && x<='z'))
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
0%
(x>='A' && x<='Z') || (x>='a' && x<='z') || (x>='0' && x<='9')
0%
(x>='a' && x<='z')
Assume that c is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if c is a tab character .
0%
(c=='\t')
0%
(c == '\n')
0%
c == ' '
0%
(x>='A' && x<='Z')
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is NOT a upper-case letter.
0%
(x>='0' && x<='9')
0%
!(x >= 'A' && x <='Z')
0%
(x>='a' && x<='z')
0%
!((x >= 'A' && x <='Z') || (x >= 'a' && x <='z'))
Assume that x is a char variable that has been declared and already given a value . Write an expression whose value is true if and only if x is alphanumeric , that is either a letter or a decimal digit.
0%
( ( x>='0' && x<='9') || ( x>='a' && x<='f' ) || ( x>='A' && x<='F') )
0%
((x>='A' && x<='Z') || (x>='a' && x<='z'))
0%
(x>='A' && x<='Z') || (x>='a' && x<='z') || (x>='0' && x<='9')
0%
(x>='A' && x<='Z') || (x>='a' && x<='z')
What's the difference in ASCII value between 'E' and 'A'? (consult a table of ASCII values):http://www.asciitable.com
0%
4
0%
3
0%
c == ' '
0%
6
0 h : 0 m : 1 s
«
Multiple Choice Questions
»
1
2
3
4
5
6
7
8
9
10
11
12
13
0
Answered
0
Not Answered
0
Not Visited
Correct : 0
Incorrect : 0
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page