60 414
Assignments Done
98,2%
Successfully Done
In April 2018

Answer to Question #26122 in C++ for Vicky

Question #26122
A library function, islower(), takes a single character (a letter) as an argument and returns a
nonzero integer if the letter is lowercase, or zero if it is uppercase. This function requires the header
file CTYPE.H. Write a program that allows the user to enter a letter, and then displays either zero or
nonzero, depending on whether a lowercase or uppercase letter was entered.
Expert's answer
#include <stdio.h>
#include <ctype.h>

int main()
{
int ch;
printf("Enter a character: ");
ch = getchar();

if (islower(ch))
puts("0");
else
puts("1");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions