CS 37 Final Review Notes Flashcards
1
Q
What does STL stand for?
A
Standard Template Library
2
Q
What does STL contain?
A
It contains algorithms such as the sort algorithm (you still have to use std). What it essentially does is it sorts the numbers in order in an array(so for example 3 6 7 9 1 3 2, will be sorted in 1 2 3 3 6 7 9 or something like that)
The parameters for this function is sort(arr, and the size of array)
(a way to get the size of an array is sizeof(arr)/sizeof(arr[0]) (the reason we do the second part is because we need to get the size of the data type)
3
Q
How do you sort only a specific amount of elements in an array?
A
you do (arr, arr + how many elements)
4
Q
A