What is the purpose of the toArray() method in a stream pipeline?
a) To transform the stream into an array
b) To filter the stream elements
c) To terminate the stream and return a single result
d) To perform a side-effect on each element of the stream