SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Structure of C Programming Language
• A C program structures basically consists of the following
parts:
 Documentation Section
 Preprocessor Section
 Global Variable Declaration Section
 The main function Section
 Input and Output Section
 End of the program
Conti…
/* Documentation Section*/
/* Date: ; Author : */
/* Preprocessor statements/section */ (Link Section)
/* Global Variable Declaration section */ (Defination)
/* Main function Section */
/* Local Variable Section */
/* Executable Section */
/* Input/Output Section */
/* End of the program Section */
Conti…
e.g. WAP in c To show the message “Hello World…”
/* Documentation Section*/
/* WAP in c To show the message “Hello World…” */
/* Date:13/12/2019 ; Author : ABC*/
/* Preprocessor statements/section */
#inlude<stdio.h>
#include<conio.h>
/* Global Variable Declaration section */
/* Main function Section */
main()
{
/* Local Variable Section */
/* Executable Section */
clrscr();
/* Input/Output Section */
printf(“n Hello World…”)
/* End of the program Section */
getch();
}
Conti…
Comments
 Comments are a way of explaining what makes a program.
 The compiler ignores comments and used by other to understand
the code. Or
 This is a comment block, which is ignored by the compiler.
 Comment can be used anywhere in the program to add information
about program or code block, which will be helpful for developers
to understand the existing cod in the future easily.
 Basically, comments has two types:
 Single line comments
 Multiline comments
Conti….
#include<stdio.h>
 This is standard I/O, this allows us to use some commands which
includes a file called stdio.h Or
 This is the preprocessor command. That notifies the compiler to
include the header file stdio.h in the program before compiling the
source code.
#include<conio.h>
 It is standard for “console I/O header file”, which manages I/O on
console based application.
main()
 The main() is the main function where program execution begins.
 Every C program must contain only one main function.
Conti…
Braces/ Brackets {}
 Two curly braces “{….}”are used to group all statements.
Printf()
 It is a function in c, which prints text on the screen. Or this is
another pre-defined function of C which is used to be displayed text
in the screen.
Scanf()
 This is another pre-defined function of C which is used to access/
input the value from keyboard.
getch()/ return 0
 At the end of the main function return 0.
Library Function in C
 Library function in c language are inbuilt functions. Which are
grouped together & placed in a common place called library .
 Each library function in a C performs specific operation.
 We can make use of these library function to get the pre-defined
output instead of writing our own code get these outputs.
 Function declaration, definition for macros are given in all header
files.
 We are including these header files in our C program using
“#include<file name.h>” command to make use of the function
those are declared in the header files.
 There are several library functions or header files are presents they
are:
a. Stdio.h b. conio.h c.string.h d. stdlib.h
e. Math.h f. time.h g.ctype.h
Installation of C
 Installation of TC is very simple just download turboC or C++ &
run .exe files.
 When you install turbo C compiler in your system, then tc directory
is created on the hard disc and various directories such as
INCLUDE,BGI,BIN &LIB etc. are created under tc.
TC
BGI INCLUDE BIN LIB
 BGI- graphics related files.
 INCLUDE- header files in C
 BIN- .exe, object etc files in C
 LIB- contains library files in C
TC Editor
TC editor is very simple and easy to use; here will
give you all tips related to TC editor & some
shortcut keys related to TC editor which is very
useful at the time of coding.
It is most common C language compiler.
The interface of turbo C is very simple . When IDE
screen appears the menu bar is activated. It
contains various menus such as:
Conti…
 File : This menu contains group of commands used for
save,edit,print, exit from editor.
 Editor : It is used for editing C program source code. E.g.. Copy,
paste, cut, undo etc.
 Search : It is used for searching specific word as well as replacing
it with another one.
 Run : It is used for running C program.
 Compile : Is is used for compile the C program.
 Debug : it is used for debugging the C program
 Project : It is used for opening , closing, & creating project.
 Option : it is used for configuring IDE of turbo C & setting up
directories etc.
 Windows : it is used for opening & closing various windows of
IDE.
Conti…
 Help : this menu is used for get help about specific topic of C
language. Similarly to get help about a specific keyword or
identifiers of C.
Thank You…!

More Related Content

PPTX
C Programming: Basic Structure of C Program
PPT
C Language
PDF
Lecture02(constants, variable & data types)
PPTX
Structure of C program
PPT
Introduction to c programming
PDF
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
PPT
Structure in c
PDF
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
C Programming: Basic Structure of C Program
C Language
Lecture02(constants, variable & data types)
Structure of C program
Introduction to c programming
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
Structure in c
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf

What's hot (20)

PDF
C pdf
PPT
Preprocessors
PPTX
Function C programming
PPTX
C Tokens
PPTX
Pointer to function 1
PPTX
Storage class in c
PPTX
Encapsulation C++
PPT
Preprocessor in C
PPT
Chapter Introduction to Modular Programming.ppt
PPTX
C language
PPTX
Data Types and Variables In C Programming
PPTX
Programming in C Basics
PPTX
Packages in java
PDF
Python Style Guide
PPTX
C# in depth
PPT
OOP in C++
PPT
Strings in c
PPTX
Intro to c++
PPTX
Functions in c
C pdf
Preprocessors
Function C programming
C Tokens
Pointer to function 1
Storage class in c
Encapsulation C++
Preprocessor in C
Chapter Introduction to Modular Programming.ppt
C language
Data Types and Variables In C Programming
Programming in C Basics
Packages in java
Python Style Guide
C# in depth
OOP in C++
Strings in c
Intro to c++
Functions in c
Ad

Similar to Stucture of c program (20)

PDF
Introduction of c language
PPT
OVERVIEW OF ‘C’ PROGRAM
PPTX
Unit-1_c.pptx you from the heart of the day revision
PDF
C class basic programming 1 PPT mayanka (1).pdf
PPTX
Introduction to C Programming
DOCX
C Fundamental.docx
PPTX
Unit-2_Getting Started With ‘C’ Language (3).pptx
PPTX
presentation on the topic: Introduction to the C language
PPTX
chapter 1.pptx
PPTX
C Programming UNIT 1.pptx
PPT
1. over view and history of c
PPTX
2.Overview of C language.pptx
PPTX
Introduction to c language
PDF
Introduction To Programming With C 1st Edition Nhce
DOCX
Chapter 3(1)
PPTX
Unit 2 l1
PPTX
Basics of C Lecture 2[16097].pptx
PPTX
C Programming Language Step by Step Part 2
PDF
Programming in c
PDF
Fundamental of Information Technology - UNIT 7
Introduction of c language
OVERVIEW OF ‘C’ PROGRAM
Unit-1_c.pptx you from the heart of the day revision
C class basic programming 1 PPT mayanka (1).pdf
Introduction to C Programming
C Fundamental.docx
Unit-2_Getting Started With ‘C’ Language (3).pptx
presentation on the topic: Introduction to the C language
chapter 1.pptx
C Programming UNIT 1.pptx
1. over view and history of c
2.Overview of C language.pptx
Introduction to c language
Introduction To Programming With C 1st Edition Nhce
Chapter 3(1)
Unit 2 l1
Basics of C Lecture 2[16097].pptx
C Programming Language Step by Step Part 2
Programming in c
Fundamental of Information Technology - UNIT 7
Ad

More from Vpmv (11)

PPT
Operating System.ppt
PDF
Classification of Computers.pdf
PDF
Basic Components of Computer....pdf
PDF
Algorithm & Flowchart.pdf
PDF
Process & Thread Management
PDF
Evolution or Generation of OS.pdf
PDF
Introduction of OS & Classification of Software
PPTX
Case, Loop & Command line args un Unix
PPTX
FILE PERMISSION OR ACCESS MODE
PPTX
Directory Management in Unix
PPT
Network topology
Operating System.ppt
Classification of Computers.pdf
Basic Components of Computer....pdf
Algorithm & Flowchart.pdf
Process & Thread Management
Evolution or Generation of OS.pdf
Introduction of OS & Classification of Software
Case, Loop & Command line args un Unix
FILE PERMISSION OR ACCESS MODE
Directory Management in Unix
Network topology

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
master seminar digital applications in india
PPTX
Lesson notes of climatology university.
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
master seminar digital applications in india
Lesson notes of climatology university.
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Sports Quiz easy sports quiz sports quiz
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
TR - Agricultural Crops Production NC III.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Pharma ospi slides which help in ospi learning
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Final Presentation General Medicine 03-08-2024.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf

Stucture of c program

  • 1. Structure of C Programming Language • A C program structures basically consists of the following parts:  Documentation Section  Preprocessor Section  Global Variable Declaration Section  The main function Section  Input and Output Section  End of the program
  • 2. Conti… /* Documentation Section*/ /* Date: ; Author : */ /* Preprocessor statements/section */ (Link Section) /* Global Variable Declaration section */ (Defination) /* Main function Section */ /* Local Variable Section */ /* Executable Section */ /* Input/Output Section */ /* End of the program Section */
  • 3. Conti… e.g. WAP in c To show the message “Hello World…” /* Documentation Section*/ /* WAP in c To show the message “Hello World…” */ /* Date:13/12/2019 ; Author : ABC*/ /* Preprocessor statements/section */ #inlude<stdio.h> #include<conio.h> /* Global Variable Declaration section */ /* Main function Section */ main() { /* Local Variable Section */ /* Executable Section */ clrscr(); /* Input/Output Section */ printf(“n Hello World…”) /* End of the program Section */ getch(); }
  • 4. Conti… Comments  Comments are a way of explaining what makes a program.  The compiler ignores comments and used by other to understand the code. Or  This is a comment block, which is ignored by the compiler.  Comment can be used anywhere in the program to add information about program or code block, which will be helpful for developers to understand the existing cod in the future easily.  Basically, comments has two types:  Single line comments  Multiline comments
  • 5. Conti…. #include<stdio.h>  This is standard I/O, this allows us to use some commands which includes a file called stdio.h Or  This is the preprocessor command. That notifies the compiler to include the header file stdio.h in the program before compiling the source code. #include<conio.h>  It is standard for “console I/O header file”, which manages I/O on console based application. main()  The main() is the main function where program execution begins.  Every C program must contain only one main function.
  • 6. Conti… Braces/ Brackets {}  Two curly braces “{….}”are used to group all statements. Printf()  It is a function in c, which prints text on the screen. Or this is another pre-defined function of C which is used to be displayed text in the screen. Scanf()  This is another pre-defined function of C which is used to access/ input the value from keyboard. getch()/ return 0  At the end of the main function return 0.
  • 7. Library Function in C  Library function in c language are inbuilt functions. Which are grouped together & placed in a common place called library .  Each library function in a C performs specific operation.  We can make use of these library function to get the pre-defined output instead of writing our own code get these outputs.  Function declaration, definition for macros are given in all header files.  We are including these header files in our C program using “#include<file name.h>” command to make use of the function those are declared in the header files.  There are several library functions or header files are presents they are: a. Stdio.h b. conio.h c.string.h d. stdlib.h e. Math.h f. time.h g.ctype.h
  • 8. Installation of C  Installation of TC is very simple just download turboC or C++ & run .exe files.  When you install turbo C compiler in your system, then tc directory is created on the hard disc and various directories such as INCLUDE,BGI,BIN &LIB etc. are created under tc. TC BGI INCLUDE BIN LIB  BGI- graphics related files.  INCLUDE- header files in C  BIN- .exe, object etc files in C  LIB- contains library files in C
  • 9. TC Editor TC editor is very simple and easy to use; here will give you all tips related to TC editor & some shortcut keys related to TC editor which is very useful at the time of coding. It is most common C language compiler. The interface of turbo C is very simple . When IDE screen appears the menu bar is activated. It contains various menus such as:
  • 10. Conti…  File : This menu contains group of commands used for save,edit,print, exit from editor.  Editor : It is used for editing C program source code. E.g.. Copy, paste, cut, undo etc.  Search : It is used for searching specific word as well as replacing it with another one.  Run : It is used for running C program.  Compile : Is is used for compile the C program.  Debug : it is used for debugging the C program  Project : It is used for opening , closing, & creating project.  Option : it is used for configuring IDE of turbo C & setting up directories etc.  Windows : it is used for opening & closing various windows of IDE.
  • 11. Conti…  Help : this menu is used for get help about specific topic of C language. Similarly to get help about a specific keyword or identifiers of C.