The endl is a predefined object of ostream class. It is used to insert a new line characters and flushes the stream. it used in C++.