SlideShare a Scribd company logo
1 of 20
Download to read offline
Basics of “C” Programming
By
R.Sivagami, Assistant Professor
Department of Computer Science and Applications
D.K.M College for women(Autonomous), Vellore-1.
What is C Language
• C is mother language of all programming language.
• It is a popular computer programming language
• It is procedure-oriented programming language.
• It is also called mid level programming language
History of C Language
Cont…
• C is a programming language developed at AT & T’s Bell Laboratories of
USA in 1972. It was designed and written by a man named Dennis Ritchie
• ANSI C standard emerged in the early 1980s, this book was split into two
titles: The original was still called Programming in C, and the title that
covered ANSI C was called Programming in ANSI C. This was done
because it took several years for the compiler vendors to release their ANSI
C compilers and for them to become ubiquitous. It was initially designed for
programming UNIX operating system. Now the software tool as well as the
C compiler is written in C. Major parts of popular operating systems like
Windows, UNIX, Linux is still written in C. This is because even today
when it comes to performance (speed of execution) nothing beats C.
Moreover, if one is to extend the operating system to work with new devices
one needs to write device driver programs. These programs are exclusively
written in C. often heard today is – “C has been already super ceded by
languages like C++, C# and Java.
Features of C Language
There are many features of c languages are given below:
• Machine independent or Portable.
• Mid-level programming language
• Structured programming language
• General-purpose language
• Rich in library
• Procedural Language
• Fast and efficient
• Easy to extend
Terminologies of ‘C’
1. Keywords
2. Identifiers
3. Variables
4. Constants
5. Special Symbols
6. Operators
7. Character & String
1.Keywords
• Keywords are the reserved words
• C has 32 Keywords.
• These Keywords combined with a formal syntax from C programming
language
• Rules to be followed for all programs written in c:
• All keywords are lower-cased
• C is case sensitive, do-while is different from DO-WHILE
• Keywords cannot be used as a variable or function name
2.Identifiers
• Identifiers refer to the name of variables, functions and arrays.
• These are user-defined names and consist of sequence of letters and
digits, with a letter as a first character.
• Both uppercase and lowercase letters permitted, although lowercase
letters are commonly used.
• The underscore character is also permitted in identifiers. It is usually
used as a link between two words in long identifiers.
Identifier names
• The number of characters in the variable that are recognized differs from
compiler to compiler
• An identifier cannot be the same as a C Keyword
3.Variables
Variables are named locations in memory that are used to hold a
value that may be modified by the program.
Unlike constants that remain unchanged during the execution of a
program.
A variable may take different values at different times during
execution.
The syntax for declaring a variable is –
Datatype Identifier Name;
Example - int sum;
Long int sum , a;
4.Constants
Constants are the fixed values that do not change during the
execution of a program.
C supports several types of constants.
Numeric Constants
 Integer constants
 Real constants
Character Constants
 Single character constant
 String constants
5. Special Symbols
• !,@,#,$,&,*,……. These all symbols that can be find
on Keyboard, are called Special Symbols.
• Every symbol has its special meaning in different
respect at different place that’s why it is called as
special symbols
6.Operators
Operator is a symbol that operates on one or more
operands and produces output.
Example - c=a + b;
In the above Example the symbols + and + are
operators that operate on operands a , b, and c.
7. Character & String
The characters that can be used to form words, numbers and
expressions depend upon the computer on which the program is
running.
The character in C are grouped into the following categories:
1. Letters
2. Digits
3. Special characters
4. White Spaces
Remember that a character ‘a’ is not equivalent to the string “a”.
THANK YOU

More Related Content

Similar to C PROGRAMMING p-1.pdf

Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxsaivasu4
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.pptManiMala75
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.pptManiMala75
 
Chapter-2 edited on Programming in Can refer this ppt
Chapter-2 edited on Programming in Can refer this pptChapter-2 edited on Programming in Can refer this ppt
Chapter-2 edited on Programming in Can refer this pptANISHYAPIT
 
Introduction of c programming unit-ii ppt
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii pptJStalinAsstProfessor
 
unit2.pptx
unit2.pptxunit2.pptx
unit2.pptxsscprep9
 
Presentation
PresentationPresentation
Presentationbhasula
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingMalikaJoya
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREjatin batra
 
C PROGRAMMING LANGUAGE.pptx
 C PROGRAMMING LANGUAGE.pptx C PROGRAMMING LANGUAGE.pptx
C PROGRAMMING LANGUAGE.pptxAnshSrivastava48
 

Similar to C PROGRAMMING p-1.pdf (20)

Unit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptxUnit-1 (introduction to c language).pptx
Unit-1 (introduction to c language).pptx
 
C programming
C programmingC programming
C programming
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
 
Chapter-2 edited on Programming in Can refer this ppt
Chapter-2 edited on Programming in Can refer this pptChapter-2 edited on Programming in Can refer this ppt
Chapter-2 edited on Programming in Can refer this ppt
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
 
Introduction of c programming unit-ii ppt
Introduction of  c programming unit-ii pptIntroduction of  c programming unit-ii ppt
Introduction of c programming unit-ii ppt
 
C language ppt
C language pptC language ppt
C language ppt
 
unit2.pptx
unit2.pptxunit2.pptx
unit2.pptx
 
Presentation
PresentationPresentation
Presentation
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
C PROGRAMMING LANGUAGE.pptx
 C PROGRAMMING LANGUAGE.pptx C PROGRAMMING LANGUAGE.pptx
C PROGRAMMING LANGUAGE.pptx
 
C programming
C programming C programming
C programming
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
c++
 c++  c++
c++
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
C.pdf
C.pdfC.pdf
C.pdf
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
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
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
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
 
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
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
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
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

C PROGRAMMING p-1.pdf

  • 1. Basics of “C” Programming By R.Sivagami, Assistant Professor Department of Computer Science and Applications D.K.M College for women(Autonomous), Vellore-1.
  • 2. What is C Language • C is mother language of all programming language. • It is a popular computer programming language • It is procedure-oriented programming language. • It is also called mid level programming language
  • 3. History of C Language
  • 4. Cont… • C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972. It was designed and written by a man named Dennis Ritchie • ANSI C standard emerged in the early 1980s, this book was split into two titles: The original was still called Programming in C, and the title that covered ANSI C was called Programming in ANSI C. This was done because it took several years for the compiler vendors to release their ANSI C compilers and for them to become ubiquitous. It was initially designed for programming UNIX operating system. Now the software tool as well as the C compiler is written in C. Major parts of popular operating systems like Windows, UNIX, Linux is still written in C. This is because even today when it comes to performance (speed of execution) nothing beats C. Moreover, if one is to extend the operating system to work with new devices one needs to write device driver programs. These programs are exclusively written in C. often heard today is – “C has been already super ceded by languages like C++, C# and Java.
  • 5. Features of C Language There are many features of c languages are given below: • Machine independent or Portable. • Mid-level programming language • Structured programming language • General-purpose language • Rich in library • Procedural Language • Fast and efficient • Easy to extend
  • 6. Terminologies of ‘C’ 1. Keywords 2. Identifiers 3. Variables 4. Constants 5. Special Symbols 6. Operators 7. Character & String
  • 7. 1.Keywords • Keywords are the reserved words • C has 32 Keywords. • These Keywords combined with a formal syntax from C programming language • Rules to be followed for all programs written in c: • All keywords are lower-cased • C is case sensitive, do-while is different from DO-WHILE • Keywords cannot be used as a variable or function name
  • 8.
  • 9. 2.Identifiers • Identifiers refer to the name of variables, functions and arrays. • These are user-defined names and consist of sequence of letters and digits, with a letter as a first character. • Both uppercase and lowercase letters permitted, although lowercase letters are commonly used. • The underscore character is also permitted in identifiers. It is usually used as a link between two words in long identifiers.
  • 10. Identifier names • The number of characters in the variable that are recognized differs from compiler to compiler • An identifier cannot be the same as a C Keyword
  • 11.
  • 12. 3.Variables Variables are named locations in memory that are used to hold a value that may be modified by the program. Unlike constants that remain unchanged during the execution of a program. A variable may take different values at different times during execution. The syntax for declaring a variable is – Datatype Identifier Name; Example - int sum; Long int sum , a;
  • 13.
  • 14. 4.Constants Constants are the fixed values that do not change during the execution of a program. C supports several types of constants. Numeric Constants  Integer constants  Real constants Character Constants  Single character constant  String constants
  • 15.
  • 16. 5. Special Symbols • !,@,#,$,&,*,……. These all symbols that can be find on Keyboard, are called Special Symbols. • Every symbol has its special meaning in different respect at different place that’s why it is called as special symbols
  • 17. 6.Operators Operator is a symbol that operates on one or more operands and produces output. Example - c=a + b; In the above Example the symbols + and + are operators that operate on operands a , b, and c.
  • 18.
  • 19. 7. Character & String The characters that can be used to form words, numbers and expressions depend upon the computer on which the program is running. The character in C are grouped into the following categories: 1. Letters 2. Digits 3. Special characters 4. White Spaces Remember that a character ‘a’ is not equivalent to the string “a”.