SlideShare a Scribd company logo
1 of 10
Learn C programming
Mohd Vais
Presented by:
What is language
If we talk about the language, any type of language so an idea is come in your mind which
is, anything which we think and we can express, by language. Or we can say language is a
way of expressing your ideas. C language is same to other natural language (like English)
which we learn. It is also one-way communication, in which computer user communicate
with computer.
History of C language
Before becoming C language, there
was a language Basic Combined
Programming language, (BCPL). It is a
programming language developed by
Martin Richards in 1966. They created
this language by combining many
features of languages.
Ken Thompson improve the BCPL
language and used the first letter of
BCPL language which is known as B
language. And C is also created by
improving B language.
INTRODUCTION TO C LANGUAGE
C language is a medium to interact with computer. The C language was developed by -
โ€œDennis Ritchieโ€ at the AT&Bell telephone laboratories in 1972. First c language was
developed to write UNIX operating system. It is also made it for easier to move programs
between computer with different hardware. It is more flexible.
The C language was names C because its predecessor was named B. The B language was
developed by โ€œKen Thompsonโ€.
Most of the software are written in C language and UNIX operating system is also written in C
because of these reasons-
* Easy to learn
* Structured language
* It produces efficient program
* It can handle low-level activities
* It can be compiled on a variety of computer platform
Structure of C programs
๏ถ Before going to learn the structure of c programs first we need to have some basic
knowledge of the following:
๏ƒ˜ Cโ€™s character set
๏ƒ˜ Keywords
๏ƒ˜ Data types
๏ƒ˜ Variables
๏ƒ˜ function
// Name of program Documentation section
#include<stdio.h> link section
#include<conio.h>
#define max Definition section
void add(); Global declaration section
int x=10;
int main() main () function section/entry point
{ int a =10; variable declaration
printf(โ€œHello mainโ€);
return 0; body of main function
}
void add() {
printf(โ€œHello addโ€); function declaration
}
A C program involves the following sections
Simple code of C โ€œhello worldโ€ program
// simple hello world C code
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello, World!n");
return;
}
Data types
C language supports the following basic data types:
๏ƒ˜ int: integer, a whole number.
๏ƒ˜ float: floating point , a number with a functional part.
๏ƒ˜ double: double โ€“precision floating point value.
๏ƒ˜ Char: single character.
Data types
Primitive data types

More Related Content

What's hot

computer languages
computer languagescomputer languages
computer languagesgulpari2
ย 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# ProgrammingSherwin Banaag Sapin
ย 
History of c
History of cHistory of c
History of cankush9927
ย 
Lecture 1- History of C Programming
Lecture 1- History of C Programming Lecture 1- History of C Programming
Lecture 1- History of C Programming Md. Imran Hossain Showrov
ย 
Lecture # 1
Lecture # 1Lecture # 1
Lecture # 1FarwaAkramMcd
ย 
History of c
History of cHistory of c
History of cShipat Bhuiya
ย 
Programing languages
Programing languagesPrograming languages
Programing languagesDanyal Ahmad
ย 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
ย 
Before Starting Python Programming Language
Before Starting Python Programming LanguageBefore Starting Python Programming Language
Before Starting Python Programming LanguageKishan Tongrao
ย 
History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming LanguageNiloy Biswas
ย 
C language myths & secrets
C language myths & secretsC language myths & secrets
C language myths & secretsankush1510
ย 
Programming in c (history of c)
Programming in c (history of c)Programming in c (history of c)
Programming in c (history of c)ViswanathanS21
ย 
5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.Fiaz Hussain
ย 
Introduction of 'C' langauge
Introduction of  'C'  langaugeIntroduction of  'C'  langauge
Introduction of 'C' langaugeAradhana Srivastava
ย 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction GopikaS12
ย 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
ย 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programmingRafael Balderosa
ย 
Unit 12 section 1 - computer programming
Unit 12   section 1 - computer programmingUnit 12   section 1 - computer programming
Unit 12 section 1 - computer programmingdlwadsworth
ย 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languageTeena Bosamiya
ย 

What's hot (20)

Programing Language
Programing LanguagePrograming Language
Programing Language
ย 
computer languages
computer languagescomputer languages
computer languages
ย 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
ย 
History of c
History of cHistory of c
History of c
ย 
Lecture 1- History of C Programming
Lecture 1- History of C Programming Lecture 1- History of C Programming
Lecture 1- History of C Programming
ย 
Lecture # 1
Lecture # 1Lecture # 1
Lecture # 1
ย 
History of c
History of cHistory of c
History of c
ย 
Programing languages
Programing languagesPrograming languages
Programing languages
ย 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
ย 
Before Starting Python Programming Language
Before Starting Python Programming LanguageBefore Starting Python Programming Language
Before Starting Python Programming Language
ย 
History of C Programming Language
History of C Programming LanguageHistory of C Programming Language
History of C Programming Language
ย 
C language myths & secrets
C language myths & secretsC language myths & secrets
C language myths & secrets
ย 
Programming in c (history of c)
Programming in c (history of c)Programming in c (history of c)
Programming in c (history of c)
ย 
5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.
ย 
Introduction of 'C' langauge
Introduction of  'C'  langaugeIntroduction of  'C'  langauge
Introduction of 'C' langauge
ย 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
ย 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
ย 
Grade 10 introduction and history of programming
Grade 10   introduction and history of programmingGrade 10   introduction and history of programming
Grade 10 introduction and history of programming
ย 
Unit 12 section 1 - computer programming
Unit 12   section 1 - computer programmingUnit 12   section 1 - computer programming
Unit 12 section 1 - computer programming
ย 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
ย 

Similar to C programming tutorial

Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming LanguageSinbad Konick
ย 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxDhirendraShahi2
ย 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingNouroz Liaquat
ย 
C programming presentation for university
C programming presentation for universityC programming presentation for university
C programming presentation for universitySheikh Monirul Hasan
ย 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
ย 
C programming 1
C programming  1C programming  1
C programming 1Ajay Wadekar
ย 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogrammingskashwin98
ย 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptxAnithaTAssistantProf
ย 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programminghamza239523
ย 
computerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxcomputerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxSubramanian Mani
ย 
History of C/C++ Language
History of C/C++ LanguageHistory of C/C++ Language
History of C/C++ LanguageFarid Hilal
ย 
Computer programming languages
Computer programming languagesComputer programming languages
Computer programming languagesSubramanianMuthusamy3
ย 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingAnandhasilambarasan D
ย 
Programming in c
Programming in cProgramming in c
Programming in cankitjain851
ย 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language BAKRANIYA KALPESH
ย 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
ย 

Similar to C programming tutorial (20)

Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
ย 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptx
ย 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
ย 
C programming presentation for university
C programming presentation for universityC programming presentation for university
C programming presentation for university
ย 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
ย 
C programming 1
C programming  1C programming  1
C programming 1
ย 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
ย 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptx
ย 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
ย 
computerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptxcomputerprogramminglanguages-201216152310.pptx
computerprogramminglanguages-201216152310.pptx
ย 
What is C.docx
What is C.docxWhat is C.docx
What is C.docx
ย 
History of C/C++ Language
History of C/C++ LanguageHistory of C/C++ Language
History of C/C++ Language
ย 
Computer programming languages
Computer programming languagesComputer programming languages
Computer programming languages
ย 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
ย 
Lecture 1-3.ppt
Lecture 1-3.pptLecture 1-3.ppt
Lecture 1-3.ppt
ย 
Programming in c
Programming in cProgramming in c
Programming in c
ย 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
ย 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
ย 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
ย 
C programme presentation
C programme presentationC programme presentation
C programme presentation
ย 

Recently uploaded

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
ย 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
ย 
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Standamitlee9823
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
ย 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
ย 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLManishPatel169454
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
ย 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
ย 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
ย 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
ย 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
ย 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
ย 

Recently uploaded (20)

Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
ย 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
ย 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
ย 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
ย 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ย 
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night StandCall Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
Call Girls In Bangalore โ˜Ž 7737669865 ๐Ÿฅต Book Your One night Stand
ย 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
ย 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
ย 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ย 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
ย 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
ย 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
ย 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
ย 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
ย 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
ย 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
ย 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
ย 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
ย 

C programming tutorial

  • 1. Learn C programming Mohd Vais Presented by:
  • 2. What is language If we talk about the language, any type of language so an idea is come in your mind which is, anything which we think and we can express, by language. Or we can say language is a way of expressing your ideas. C language is same to other natural language (like English) which we learn. It is also one-way communication, in which computer user communicate with computer.
  • 3. History of C language Before becoming C language, there was a language Basic Combined Programming language, (BCPL). It is a programming language developed by Martin Richards in 1966. They created this language by combining many features of languages. Ken Thompson improve the BCPL language and used the first letter of BCPL language which is known as B language. And C is also created by improving B language.
  • 4. INTRODUCTION TO C LANGUAGE C language is a medium to interact with computer. The C language was developed by - โ€œDennis Ritchieโ€ at the AT&Bell telephone laboratories in 1972. First c language was developed to write UNIX operating system. It is also made it for easier to move programs between computer with different hardware. It is more flexible. The C language was names C because its predecessor was named B. The B language was developed by โ€œKen Thompsonโ€. Most of the software are written in C language and UNIX operating system is also written in C because of these reasons- * Easy to learn * Structured language * It produces efficient program * It can handle low-level activities * It can be compiled on a variety of computer platform
  • 5. Structure of C programs ๏ถ Before going to learn the structure of c programs first we need to have some basic knowledge of the following: ๏ƒ˜ Cโ€™s character set ๏ƒ˜ Keywords ๏ƒ˜ Data types ๏ƒ˜ Variables ๏ƒ˜ function
  • 6. // Name of program Documentation section #include<stdio.h> link section #include<conio.h> #define max Definition section void add(); Global declaration section int x=10; int main() main () function section/entry point { int a =10; variable declaration printf(โ€œHello mainโ€); return 0; body of main function } void add() { printf(โ€œHello addโ€); function declaration } A C program involves the following sections
  • 7. Simple code of C โ€œhello worldโ€ program // simple hello world C code #include<stdio.h> #include<conio.h> void main() { printf("Hello, World!n"); return; }
  • 8. Data types C language supports the following basic data types: ๏ƒ˜ int: integer, a whole number. ๏ƒ˜ float: floating point , a number with a functional part. ๏ƒ˜ double: double โ€“precision floating point value. ๏ƒ˜ Char: single character.