title Program Termination | Microsoft Docs ms.custom ms.date 11/04/2016 ms.technology cpp-language 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 author mikeblome ms.author mblome 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