initialize() function is used to initialize the private data members while declaring the object.
With the above code, we are initializing the values of “name” and “cost” during the time of declaration.
We have initialized the values of ‘500’ to cost and ‘pizza’ to name