Log In Register

Units


Character Class Testing & Conversions - Questions and Answers

 

Practice these Character Class Testing & Conversions under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Character Class Testing & Conversions for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Character Class Testing & Conversions of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Character Class Testing & Conversions.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Character Class Testing & Conversions under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Character Class Testing & Conversions topic of C Programming:

 

1.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         char i = '9';
  5.         if (isdigit(i))
  6.             printf("digit\n");
  7.         else
  8.             printf("not digit\n");
  9.             return 0;
  10.     }

Answer: Option C

Explanation:

2.

What is the difference in the ASCII value of capital and non-capital of the same letter is?

Answer: Option B

Explanation:

3.

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

Answer: Option A

Explanation:

4.

The following expression can be substituted for.
    if (isalpha(c) && isdigit(c))

Answer: Option D

Explanation:

5.

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

Answer: Option A

Explanation:

6.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         char c = 't';
  6.         printf("is :%c\n", tolower('A'));
  7.     }

Answer: Option C

Explanation:

7.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         char i = 9;
  6.         if (isdigit(i))
  7.             printf("digit\n");
  8.         else
  9.             printf("not digit\n");
  10.             return 0;
  11.     }

Answer: Option C

Explanation:

8.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         char c = 't';
  6.         printf("%d\n", isspace(c));
  7.     }

Answer: Option D

Explanation:

9.

Which of the following library function is not case-sensitive?

Answer: Option A

Explanation:

10.

Which types of input are accepted in toupper(c)?

Answer: Option D

Explanation:

11.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         int i = 9;
  6.         if (isdigit(i))
  7.             printf("digit\n");
  8.         else
  9.             printf("not digit\n");
  10.             return 0;
  11.     }

Answer: Option A

Explanation:

12.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         int i = 0;
  6.         if (isspace(i))
  7.             printf("space\n");
  8.         else
  9.             printf("not space\n");
  10.             return 0;
  11.     }

Answer: Option A

Explanation:

13.

Which of the following will return a non-zero value when checked with isspace(c)?

Answer: Option A

Explanation:

14.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     #include <ctype.h>
  3.     int main()
  4.     {
  5.         if (isspace('n'))
  6.             printf("space\n");
  7.         else
  8.             printf("not space\n");
  9.             return 0;
  10.     }

Answer: Option C

Explanation: