isgreater() in C++

isgreater(): This function is available in the file cmath. This function checks that first value (x) is greater than the second value (y) or not. This function returns true (1) if x>y, otherwise it returns false(0). 

Parameters: Two parameters are required for this function.

x : The first value.

y: The second value.

Syntax:

isgreater(x,y)

For Example:

isgreater(10,5) =  > It returns true.

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    double X = 10, Y = 5;

    cout << isgreater(X, Y) << "\n";

    return 0;
}


isgraph() in C++

isgraph(): This function is available in the file ctype.h. This function checks whether a character has a graphical representation. This function return value different from zero (i.e. true) if indeed c has a graphical representation as a character. Zero (i.e. false) otherwise.

Parameters: One parameters are required for this function.

arg: A character to be checked.

Syntax:

isgraph(arg)

Note:

1. All digits [0,9] has graphical representations.

2. Punctuation characters (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~) has graphical representations.

3. All English alphabets [a-z], [A-Z] has graphical representations.

For Example:

isgraph('8') = > It retuns true or any non zero value.

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    char C = '8';
    cout << isgraph(C) << "\n";

    return 0;
}


isfinite() in C++

isfinite(): This function is available in the file cmath. This function checks if the given value is finite or not. A finite value is any floating-point value that is neither infinite nor NaN. It returns a non-zero value (true) if x is finite; and zero (false) otherwise.

Parameters: One parameter is required for this function.

arg: A floating-point value.

Syntax:

isfinite(arg)

For Example:

isfinite(10.99)  = > It returns true.

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    double x = 10.99;

    cout << isfinite(x) << "\n";

    return 0;
}


isdigit() in C++

isdigit(): This function is available in the file ctype.h. This function checks the character is a decimal digit or not. This function returns a value different from zero (i.e. true) if indeed c is a decimal digit. Zero (i.e. false) otherwise.

Parameters: One parameter is required for this function.

arg: Character to be checked.

Syntax:

isdigit(arg)

For Example:

isdigit('1') = > It returns true.

Approach

C++

#include <bits/stdc++.h>
using namespace std;

int main()
{
    char ch = '1';

    cout << isdigit(ch) << "\n";

    return 0;
}