0
3.6kviews
Explain pow(), abs( ), isalnum( ) and ceil( ) function.
1 Answer
written 8.3 years ago by |
A pow() function is used to find power of any number x raised to any number y. To store the value of x^y in A the syntax used is
A=pow(x,y);
The abs() function returns only the magnitude of a number and not its sign.
A=abs(-5);
The value stored in A will be 5 and not ‘-5’
The isalnum() verifies whether a value is alphanumeric or not. If it is not, it will return 0.
A=’#’;
if(isalnum(A))
printf(“alphanumeric”);
else
printf(“Not alphanumeric”);
Output
Not Alphanumeric
The ceil(x) returns the value of smallest integer greater than x.
A=ceil(5.75);
This will store value 6 in A.