C++ List push_front()C++ List push_front() function adds a new element in the beginning of the list. Therefore, increasing the size of the list by one. push_front(0) function adds 0 element in the beginning. SyntaxSuppose an element is 'x': Parameterx: It is the value to be inserted in the beginning of the list. Return valueIt does not return any value. ExampleLet's see a simple example Output: 10,20,30,40,50 In this example, push_front() function inserts the element '10' in the beginning of the list. Next Topicpop_back() Function |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India