C Programming Language Program Execution Steps M Suwarnalatha

  • Slides: 9
Download presentation
C Programming Language Program Execution Steps M. Suwarnalatha Dept. of Computer Science Avanthi Degree

C Programming Language Program Execution Steps M. Suwarnalatha Dept. of Computer Science Avanthi Degree & P. G College

Basic Steps for Creating & Executing Step 1 Creating Source Code Press Compile Source

Basic Steps for Creating & Executing Step 1 Creating Source Code Press Compile Source Code Press Step 3 Run Executable Code Press Step 4 Check Result Press Step 2 F 2 To Save Alt + F 9 Ctrl + F 9 Alt + F 5 1

Creating Source Code What is source code? - Source Code is the file which

Creating Source Code What is source code? - Source Code is the file which contains programming code in high level language. - To create source code, we need a text editor to write the program. - In C programming language every source code file must be saved with “. c” extension. 2

Creating Source Code Steps to create source code? - Open a text editor. -

Creating Source Code Steps to create source code? - Open a text editor. - Create New File. - Type the program instructions. - Save the file with “. c” extension. 3

Compiling Source Code What is Compilation? - Compilation is the process of translating the

Compiling Source Code What is Compilation? - Compilation is the process of translating the code from high level language to low level language. - But before translation compiler check for the errors. If there any errors it does not translate, simply returns list of errors. - To compile a C source code in Turbo C, we use shortcut key ALT + F 9 4

Executing/Running Executable Code - After completing the compilation the compiler generates an executable file

Executing/Running Executable Code - After completing the compilation the compiler generates an executable file with. exe extension. - We need to execute this executable file to generate result - To run a C executable code in Turbo C, we use shortcut key CTRL + F 9 4

Checking Result - After execution the result is placed in the window called User

Checking Result - After execution the result is placed in the window called User Screen. We need to open that user screen to check result - To open user screen in Turbo C, we use shortcut key ALT + F 5 4

C Program Execution Process Source Code abc Compiler ALT+F 9 Object Code Linker 110

C Program Execution Process Source Code abc Compiler ALT+F 9 Object Code Linker 110 add User Screen Executable Code ALT+F 5 CRTL+F 9 CPU Sample. c Sample. exe Sample. obj stdio. h List of ERRORS Header Files 4