In this problem as mentioned in question there are some function which is being created as firstFunc and secondFunc. In these functions there is just single cout statement . Below mention code is compiled in Visual Studio 2015 and output snap is attached.. If any problem you feel and want explanation feel free to contact.