Computer Science, asked by venugopalkuna6848, 1 year ago

Distinguish between islower() and to lower() in c++

Answers

Answered by lakshya773
1

islower () checks whether the variable is in lowercase or uppercase .

tolower () converts the variable to lowercase.

Answered by Iammanjula
0

Answer:

Character testing function islower(c) is specified in header file ctype.h. This function ascertains the case of the provided argument, in this case c. If true, it returns a value other than zero (0).

Tolower (c) is a conversion function that converts the parameter c to lowercase and is defined in the ctype.h header file.

Explanation:

Islower() function in C/C++:

This function is used to determine whether a given string contains any lowercase letters. It can also determine whether a single character provided as input is in lowercase.

The Syntax is:

int islower( int arg)

Because it returns a non-zero value when the string contains lowercase letters and a zero otherwise, this function has an int return type. The character to be checked is contained in one of its parameters.

Tolower() function in C/C++:

The ctype.h header file contains the definition of the tolower() function. The tolower() method turns an uppercase alphabet to a lowercase alphabet if the character being supplied is an uppercase alphabet.

The Syntax is:

int tolower(int ch)

Basically, tolower() returns an int value, which can be converted to a char value in C using %c.

However, typecasting is necessary in C++ as follows:

(Char) tolower('A'), char c.

To learn more, please visit:

https://brainly.in/textbook-solutions/q-write-program-c-using-tolower-function?source=quick-results

https://brainly.in/question/6018107

#SPJ2

Similar questions