250+ TOP MCQs on Character Class Testing & Conversions and Answers

’s Technical Questions and Answers on C helps people preparing for Job Interviews. One should practice these questions continuously for 2-3 months, thereby ensuring a top position in Technical rounds in C Programming language.

Here is a listing of C Objective Questions on “Character Class Testing & Conversions” along with answers, explanations and/or solutions:

1. Which is true about isaplpha(c), where c is an int that can be represented as an unsigned?

char or EOF.isalpha(c) returns

a) Non-zero if c is alphabetic
b) 0 if c is not alphabetic
c) Both Non-zero if c is alphabetic & 0 if c is not alphabetic
d) None of the mentioned
Answer: c
Clarification: None.

2. Which is true about isupper(c), where c is an int that can be represented as an unsigned?

char or EOF.isupper(c) returns

a) Non-zero if c is upper case
b) 0 if c is not upper case
c) Nothing
d) Both Non-zero if c is upper case & 0 if c is not upper case
Answer: d
Clarification: None.

3. Which is true about isalnum(c), where c is an int that can be represented as an unsigned?

 char or EOF.isalnum(c) returns

a) Non-zero if isalpha(c) or isdigit(c)
b) 0 if not isalpha(c) or not isdigit(c)
c) Both Non-zero if isalpha(c) or isdigit(c) & 0 if not isalpha(c) or not isdigit(c)
d) None of the mentioned
Answer: c
Clarification: None.

4. What will be the output of the following C code?

  1.     #include 
  2.     #include 
  3.     int main()
  4.     {
  5.         char c = 't';
  6.         printf("%dn", isspace(c));
  7.     }

a) Non-zero number
b) Nothing
c) Error
d) t
Answer: a
Clarification: None.

5. What will be the output of the following C code?

  1.     #include 
  2.     #include 
  3.     int main()
  4.     {
  5.         char c = 't';
  6.         printf("is :%cn", tolower('A'));
  7.     }

a) A
b) a
c) Non-zero number
d) Zero
Answer: b
Clarification: None.

6. Which types of input are accepted in toupper(c)?
a) char
b) char *
c) float
d) Both char and char *
Answer: a
Clarification: None.

7. What is the difference in the ASCII value of capital and non-capital of the same letter is?
a) 1
b) 16
c) 32
d) Depends with compiler
Answer: c
Clarification: None.

Leave a Reply

Your email address will not be published. Required fields are marked *