C ++ program to sort an array of size 3
#include <algorithm> NEW_LINE #include <iostream> NEW_LINE using namespace std ; int main ( ) { int a [ ] = { 10 , 12 , 5 } ; sort ( a , a + 3 ) ; for ( int i = 0 ; i < 3 ; i ++ ) cout << a [ i ] << " ▁ " ; return 0 ; }