Open In App

valarray end() function in C++

Last Updated : 24 Oct, 2018
Comments
Improve
Suggest changes
Like Article
Like
Report
The end() function is defined in valarray header file. This function returns an iterator pointing to the past-the-end element in the valarray v. Syntax:
template< class T > 
    end( valarray<T>& v );
Parameter: This function takes a mandatory parameter v which represents the valarray object. Returns: This function returns the iterator to the past-the-end in the valarray. Below programs illustrate the above function: Example 1:-
Output:
valarray contains= 10 20 30 40 50
Example 2:-
Output:
valarray contains= -10 -20 -30 -40

Practice Tags :

Similar Reads