title Program Termination | Microsoft Docs ms.custom ms.date 11/04/2016 ms.reviewer ms.suite ms.technology cpp-language ms.tgt_pltfrm ms.topic language-reference dev_langs C++ helpviewer_keywords terminating execution quitting applications exiting applications programs [C++], terminating ms.assetid fa0ba9de-b5f1-4e7b-aa65-e7932068b48c caps.latest.revision 6 author mikeblome ms.author mblome manager ghogen ms.workload cplusplus Program Termination In C++, there are several ways to exit a program: Call the exit function. Call the abort function. Execute a return statement from main. See Also main: Program Startup