Built-In Functions
Built-In Functions
sqrt() Function
The sqrt() function is used to determine the square root of the value of type double.
It is defined inside <cmath> header file.
2. pow() Function
The pow() function is used to find the value of the given number raised to some
power.
This function is also defined inside <cmath> header file.
3. sort() Function
The sort() function is part of STL’s <algorithm> header.
It is a function template that is used to sort the random access containers such as
vectors, arrays, etc.
4. count() Function
Returns the number of elements in the range [first,last) that compare equal to val.
5. count_if() Function
Returns the number of elements in the range [first,last) for which pred is true.
6. find() Function
An iterator to the first element in the range that compares equal to val.
If no elements match, the function returns last.
7. swap() Function
Exchanges the values of a and b.
8.reverse() Function
Reverses the order of the elements in the range [first,last).
9. min_element() Function
Returns an iterator pointing to the element with the smallest value in the range
[first,last).
10. max_element() Function
Returns an iterator pointing to the element with the largest value in the range
[first,last).
11. min() Function
Returns the smallest of a and b. If both are equivalent, a is returned.