C Programming - Character Class Testing & Conversions
Question 1
|
Which of the following library function is not case-sensitive?
toupper()
| |
tolower()
| |
isdigit()
| |
All of the mentioned
|
Question 2
|
The following expression can be substituted for. if (isalpha(c) && isdigit(c))
if (isalnum(c))
| |
if (isalphanum(c))
| |
if (isalphanumeric(c))
| |
None of the mentioned
|
Question 3
|
Which of the following will return a non-zero value when checked with isspace(c)?
blank
| |
newline
| |
return
| |
All of the mentioned
|
Question 4
|
What is the output of this C code?
digit
| |
not digit
| |
Depends on the compiler
| |
None of the mentioned
|
Question 5
|
What is the output of this C code?
digit
| |
not digit
| |
Depends on the compiler
| |
None of the mentioned
|
Question 6
|
What is the output of this C code?
digit
| |
not digit
| |
Depends on the compiler
| |
None of the mentioned
|
Question 7
|
What is the output of this C code?
Compile time error
| |
space
| |
not space
| |
None of the mentioned
|
Question 8
|
What is the output of this C code?
Compile time error
| |
space
| |
not space
| |
None of the mentioned
|
Question 9
|
Which is true about isaplpha(c), where c is an int that can be represented as an unsigned char or EOF.isalpha(c) returns?
Non-zero if c is alphabetic
| |
0 if c is not alphabetic
| |
Both a & b
| |
None of the mentioned
|
Question 10
|
Which is true about isalnum(c), where c is an int that can be represented as an unsigned char or EOF.isalnum(c) returns?
Non-zero if isalpha(c) or isdigit(c)
| |
0 if not isalpha(c) or not isdigit(c)
| |
Both a & b
| |
None of the mentioned
|
Question 11
|
What is the output of this C code?
Non-zero number
| |
Nothing
| |
Error
| |
t
|
Question 12
|
What is the output of this C code?
A
| |
a
| |
Non-zero number
| |
Zero
|
Question 13
|
Which types of input are accepted in toupper(c)?
char
| |
char *
| |
float
| |
Both (a) and (b)
|
Question 14
|
What is the difference in the ASCII value of capital and non-capital of the same letter is?
1
| |
16
| |
32
| |
Depends with compiler
|
Check Your Answers:
1. C
2. D
3. D
4. B
5. B
6. A
7. B
8. C
9. C
10. C
11. A
12. B
13. A
14. C
0 comments:
Post a Comment