SlideShare a Scribd company logo
1 of 10
PROGRAMMING IN C &
C++
Subject Code : 18UMAA31
Subject In-charge : Mr.S.Viswanathan
Importance of C
Popularity of C is due to many qualities,
• Robust Language – Means rich set of built-in functions and operators are
used.
• It is efficient and fast – due to its variety of data types and powerful
operators.
• Example: Incrementing a variable from 0 to 15000 take one second
Cont…
• Highly Portable – Means Program written in one computer can be run on
another.
• Suited for Structured Programming – Makes program debugging, testing
and maintenance easier.
• Ability to Extend itself – Means we can add our own functions to make
the program simple.
Basic Structure of C Program
DOCUMENTATION SECTION
LINK SECTION
DEFINITION SECTION
GLOBAL DECLARATION SECTION
Continue..
Cont…
Main() Function Section
{
}
Declaration Part
Executable Part
Sub Program Section Function 1
Function 2
Function N
.
.
.
.
.
.
(User –
Defined
Functions)
Cont…
• Documentation Section – Consists of Comment lines for mention the
followings,
1) Name of the Program
2) Author of the Program
3) Other needed Details (created date, function name details
etc..)
Cont…
• Link Section – It gives instructions to compiler to link the built in functions
from system library.
Ex: #include<stdio.h>
#include<conio.h>
• Definition Section – It defines all the symbolic constants.
Ex: #define PI 3.14
Cont…
• Global Declaration Section – Variables that are used in more than one functions
are declared in this section.
Ex:
int a = 10; // Global Variable
int add(){ int sub(){
Printf(“%d”,a); Printf(“%d”,a);
} }
Cont…
• main() Function Section – Every program must have a main function.
• It consists of two sections,
1) Declaration Part
2) Executable Part
Declaration Part – Declares all the needed variables for a program.
Executable Part – At least one statement should be in the executable part.
• Program execution begins at the opening brace({ ) and ends at the closing brace ( } )
Cont…
• Sub-Program Section – Contains all user-defined functions
• User-Defined functions are placed after the main() Section.

More Related Content

What's hot (20)

Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
 
C Program Structure
C Program StructureC Program Structure
C Program Structure
 
Lesson 3.1 variables and constant
Lesson 3.1 variables and constantLesson 3.1 variables and constant
Lesson 3.1 variables and constant
 
C PROGRAMMING
C PROGRAMMINGC PROGRAMMING
C PROGRAMMING
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compiler
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
 
Lesson 2 beginning the problem solving process
Lesson 2 beginning the problem solving processLesson 2 beginning the problem solving process
Lesson 2 beginning the problem solving process
 
An Overview of Programming C
An Overview of Programming CAn Overview of Programming C
An Overview of Programming C
 
The analysis synthesis model of compilation
The analysis synthesis model of compilationThe analysis synthesis model of compilation
The analysis synthesis model of compilation
 
Lesson 5 .1 selection structure
Lesson 5 .1 selection structureLesson 5 .1 selection structure
Lesson 5 .1 selection structure
 
C programming part1
C programming part1C programming part1
C programming part1
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
7 compiler lab
7 compiler lab 7 compiler lab
7 compiler lab
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Spr ch-05-compilers
Spr ch-05-compilersSpr ch-05-compilers
Spr ch-05-compilers
 
Cd unit i
Cd unit iCd unit i
Cd unit i
 
Structure of C program
Structure of C programStructure of C program
Structure of C program
 
Chapter 3(1)
Chapter 3(1)Chapter 3(1)
Chapter 3(1)
 
Lesson 3.2 data types for memory location
Lesson 3.2 data types for memory locationLesson 3.2 data types for memory location
Lesson 3.2 data types for memory location
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 

Similar to Programming in c (importance of c)

C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTBatra Centre
 
presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languageGautamGupta136
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsssuserf86fba
 
5. Functions in C.pdf
5. Functions in C.pdf5. Functions in C.pdf
5. Functions in C.pdfsantosh147365
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEMMansi Tyagi
 
C programming course material
C programming course materialC programming course material
C programming course materialRanjitha Murthy
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxrajkumar490591
 
Book management system
Book management systemBook management system
Book management systemSHARDA SHARAN
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partManuSingh669370
 
Overview of c++
Overview of c++Overview of c++
Overview of c++geeeeeet
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptManivannan837728
 

Similar to Programming in c (importance of c) (20)

OVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAMOVERVIEW OF ‘C’ PROGRAM
OVERVIEW OF ‘C’ PROGRAM
 
C PROGRAMMING p-2.pdf
C PROGRAMMING p-2.pdfC PROGRAMMING p-2.pdf
C PROGRAMMING p-2.pdf
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
C session 1.pptx
C session 1.pptxC session 1.pptx
C session 1.pptx
 
presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C language
 
Overview of c
Overview of cOverview of c
Overview of c
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Introduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic conceptsIntroduction To C++ programming and its basic concepts
Introduction To C++ programming and its basic concepts
 
5. Functions in C.pdf
5. Functions in C.pdf5. Functions in C.pdf
5. Functions in C.pdf
 
Notes of c programming 1st unit BCA I SEM
Notes of c programming  1st unit BCA I SEMNotes of c programming  1st unit BCA I SEM
Notes of c programming 1st unit BCA I SEM
 
C programming course material
C programming course materialC programming course material
C programming course material
 
C structure
C structureC structure
C structure
 
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptxIIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
IIM.Com-FIT-Unit2(14.9.2021 TO 30.9.2021).pptx
 
C programming
C programmingC programming
C programming
 
C++ Constructs.pptx
C++ Constructs.pptxC++ Constructs.pptx
C++ Constructs.pptx
 
Book management system
Book management systemBook management system
Book management system
 
Oosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction partOosd lecture unit 4 ppt introduction part
Oosd lecture unit 4 ppt introduction part
 
Overview of c++
Overview of c++Overview of c++
Overview of c++
 
U19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).pptU19CS101 - PPS Unit 4 PPT (1).ppt
U19CS101 - PPS Unit 4 PPT (1).ppt
 
C programming
C programming C programming
C programming
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Programming in c (importance of c)

  • 1. PROGRAMMING IN C & C++ Subject Code : 18UMAA31 Subject In-charge : Mr.S.Viswanathan
  • 2. Importance of C Popularity of C is due to many qualities, • Robust Language – Means rich set of built-in functions and operators are used. • It is efficient and fast – due to its variety of data types and powerful operators. • Example: Incrementing a variable from 0 to 15000 take one second
  • 3. Cont… • Highly Portable – Means Program written in one computer can be run on another. • Suited for Structured Programming – Makes program debugging, testing and maintenance easier. • Ability to Extend itself – Means we can add our own functions to make the program simple.
  • 4. Basic Structure of C Program DOCUMENTATION SECTION LINK SECTION DEFINITION SECTION GLOBAL DECLARATION SECTION Continue..
  • 5. Cont… Main() Function Section { } Declaration Part Executable Part Sub Program Section Function 1 Function 2 Function N . . . . . . (User – Defined Functions)
  • 6. Cont… • Documentation Section – Consists of Comment lines for mention the followings, 1) Name of the Program 2) Author of the Program 3) Other needed Details (created date, function name details etc..)
  • 7. Cont… • Link Section – It gives instructions to compiler to link the built in functions from system library. Ex: #include<stdio.h> #include<conio.h> • Definition Section – It defines all the symbolic constants. Ex: #define PI 3.14
  • 8. Cont… • Global Declaration Section – Variables that are used in more than one functions are declared in this section. Ex: int a = 10; // Global Variable int add(){ int sub(){ Printf(“%d”,a); Printf(“%d”,a); } }
  • 9. Cont… • main() Function Section – Every program must have a main function. • It consists of two sections, 1) Declaration Part 2) Executable Part Declaration Part – Declares all the needed variables for a program. Executable Part – At least one statement should be in the executable part. • Program execution begins at the opening brace({ ) and ends at the closing brace ( } )
  • 10. Cont… • Sub-Program Section – Contains all user-defined functions • User-Defined functions are placed after the main() Section.