SlideShare a Scribd company logo
1 of 36
 Consists of a set of predefined rules.
 These rules form the syntax of that language.
 Hence learning a programming language is
nothing but learning of that language.
 Computer can understand only instructions written
in binary code ( 0 and 1), They do not directly read
or understand a any programming language. And
so a programming language is converted into
binary code by using a special program called
compiler.
 A program which translates instructions written in
a programming language into binary code is called
a compiler.
 When we write a program in C Language, what we
write is called Source Code.
 The compiler’s output is called executable code.
 C is a programming language developed at
AT&T Bell laboratories around 1972.
 It was designed and written by Dennis M.
Ritchie.
 C was standardized in 1989 by American
National Standard Institute (ANSI). So it came
to be known as ANSI C.
 C is a structured language. It breaks up a
program into small parts known as functions.
 Flow chart
use to define flow of any program.
symbolic representation of program.
use different symbols.
 Rectangle
 Parallelogram
 Diamond
 Lines
 oval
 Use to define process in program
 Use to define input and output in program
 Use to specify condition in program
 To show flow of the program
 Use to declare start and end of flow chart and
connect flow chart with other flow chart
pages also.
start
end
Input
outputoutput
conditionProcess if
true
Process if
false
start
end
Insert value of i
Print value of I
is less than
five
Print value of
I is greater
than five
If(i<5)
Declare variable I
as integer
Documentation
Symbolic Constant Definition
File Include Section
Global Variable Declaration
Main()
{
Declaration
Executable Statements
}
Function 1 Function 2
Function n….
starting
Section
Compulsory
section for all
C Programs
User Defined
Functions
 Compile is one type of program to convert
source code into machine level code,
 Compiler compile the code of block and
return the error and warning list.
 #include <stdio.h>
 #include <conio.h>
 void main()
{
printf(“My first program”);
getch();
}
 #include <stdio.h>
 #include <conio.h>
# : is pre possessive directive.
use to include header files before
start the program.
 Header file is collection of pre define
functions.
 Extension of header file is must “.h”.
 Header files are located in “INCLUDE” folder
of “TC”.
 void main()
{
main()
c compile founds main() to start execution of
program.
must declare main function in every program.
 {
 braces use to define starting of coding block.
 printf(“My First program”);
 printf() : use to print any formatted
string in output window of
Turbo c.
header file : stdio.h
( standard input output )
 getch();
 }
 getch() use to get 1 character from
keyboard.
} define end of coding block.
 Compile the source code with.
Alt + F9
Run the program with.
Crtl + F9
 C language is totally case sensitive language.
 All the statements of C language must
terminate with semi colon ( ; )
 My First program
file type extension
 C- Source file .C
 application file .EXE
 object file .OBJ
 Comment lines ignore by c compiler
// use for single line comment
/* */ use for multiline comment
 Integer
 Float
 Double
 Character
 Signed integer
range -32,768 to 32,767
occupy first bit as a sigh bit.
( + / - )
memory space ( 2 bytes )
 Unsigned integer
range 0 to 65,535
not occupy any bit as sign bit.
memory space ( 2 bytes )
Note : to declare unsigned integer variable
must use unsigned key word before integer.
 Use to store values with fiction point.
memory space ( 4 bytes) 32 bits
Double 64 bits(8 bytes)
Long double 80 bits(10 bytes)
 Default unsigned character
 8 bits ( 1 byte )
 Range : 0 to 255
 Signed character
 8 bits ( 1 byte )
 Range : -128 to 127
 int a = 10;
 printf(“Value of variable a is : %d”,a);
 o/p : Value of variable a is : 10
 %d use for integer values
 %f use for float values
 %c use for character
 %s use for String
 %l use for double values
 %lf use for long double values
 Use
 scanf() function
 Syntax :
 scanf(“format character ”, &variable name);
 int a;
 printf(“Enter value of a ”);
 scanf(“%d”,&a);
 printf(“Value of variable a is : %d”,a);
 o/p value of variable a is : 10
Note : assume that we entered 10 from
keyboard.

More Related Content

What's hot (20)

File Handling in C++
File Handling in C++File Handling in C++
File Handling in C++
 
Pure virtual function and abstract class
Pure virtual function and abstract classPure virtual function and abstract class
Pure virtual function and abstract class
 
File handling in C++
File handling in C++File handling in C++
File handling in C++
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Introduction to cpp
Introduction to cppIntroduction to cpp
Introduction to cpp
 
C program compiler presentation
C program compiler presentationC program compiler presentation
C program compiler presentation
 
Html text and formatting
Html text and formattingHtml text and formatting
Html text and formatting
 
Increment and Decrement operators in C++
Increment and Decrement operators in C++Increment and Decrement operators in C++
Increment and Decrement operators in C++
 
Data members and member functions
Data members and member functionsData members and member functions
Data members and member functions
 
Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1Windows Forms For Beginners Part - 1
Windows Forms For Beginners Part - 1
 
C Programming
C ProgrammingC Programming
C Programming
 
Function in c
Function in cFunction in c
Function in c
 
Textbox n label
Textbox n labelTextbox n label
Textbox n label
 
Php forms
Php formsPhp forms
Php forms
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
 
Chapter 08 data file handling
Chapter 08 data file handlingChapter 08 data file handling
Chapter 08 data file handling
 
Evaluation of postfix expression using stack
Evaluation of postfix expression using stackEvaluation of postfix expression using stack
Evaluation of postfix expression using stack
 
file handling c++
file handling c++file handling c++
file handling c++
 
Learning HTML
Learning HTMLLearning HTML
Learning HTML
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 

Similar to C Theory

Similar to C Theory (20)

Cp week _2.
Cp week _2.Cp week _2.
Cp week _2.
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)
 
Lect '1'
Lect '1'Lect '1'
Lect '1'
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
c_pro_introduction.pptx
c_pro_introduction.pptxc_pro_introduction.pptx
c_pro_introduction.pptx
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
C notes
C notesC notes
C notes
 
C Lang notes.ppt
C Lang notes.pptC Lang notes.ppt
C Lang notes.ppt
 
C tutorials
C tutorialsC tutorials
C tutorials
 
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
 
C programming
C programmingC programming
C programming
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topics
 
over all view programming to computer
over all view programming to computer over all view programming to computer
over all view programming to computer
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Unit 2 ppt
Unit 2 pptUnit 2 ppt
Unit 2 ppt
 

More from Shyam Khant

More from Shyam Khant (8)

Unit2.data type, operators, control structures
Unit2.data type, operators, control structuresUnit2.data type, operators, control structures
Unit2.data type, operators, control structures
 
Introducing to core java
Introducing to core javaIntroducing to core java
Introducing to core java
 
C++
C++C++
C++
 
Php
PhpPhp
Php
 
C++ theory
C++ theoryC++ theory
C++ theory
 
Java script
Java scriptJava script
Java script
 
SQL
SQLSQL
SQL
 
Hashing 1
Hashing 1Hashing 1
Hashing 1
 

Recently uploaded

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
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
 
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
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
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
 
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
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
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
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

C Theory

  • 1.
  • 2.  Consists of a set of predefined rules.  These rules form the syntax of that language.  Hence learning a programming language is nothing but learning of that language.
  • 3.  Computer can understand only instructions written in binary code ( 0 and 1), They do not directly read or understand a any programming language. And so a programming language is converted into binary code by using a special program called compiler.  A program which translates instructions written in a programming language into binary code is called a compiler.  When we write a program in C Language, what we write is called Source Code.  The compiler’s output is called executable code.
  • 4.  C is a programming language developed at AT&T Bell laboratories around 1972.  It was designed and written by Dennis M. Ritchie.  C was standardized in 1989 by American National Standard Institute (ANSI). So it came to be known as ANSI C.  C is a structured language. It breaks up a program into small parts known as functions.
  • 5.  Flow chart use to define flow of any program. symbolic representation of program. use different symbols.
  • 6.  Rectangle  Parallelogram  Diamond  Lines  oval
  • 7.  Use to define process in program
  • 8.  Use to define input and output in program
  • 9.  Use to specify condition in program
  • 10.  To show flow of the program
  • 11.  Use to declare start and end of flow chart and connect flow chart with other flow chart pages also.
  • 13. start end Insert value of i Print value of I is less than five Print value of I is greater than five If(i<5) Declare variable I as integer
  • 14. Documentation Symbolic Constant Definition File Include Section Global Variable Declaration Main() { Declaration Executable Statements } Function 1 Function 2 Function n…. starting Section Compulsory section for all C Programs User Defined Functions
  • 15.  Compile is one type of program to convert source code into machine level code,  Compiler compile the code of block and return the error and warning list.
  • 16.  #include <stdio.h>  #include <conio.h>  void main() { printf(“My first program”); getch(); }
  • 17.  #include <stdio.h>  #include <conio.h> # : is pre possessive directive. use to include header files before start the program.
  • 18.  Header file is collection of pre define functions.  Extension of header file is must “.h”.  Header files are located in “INCLUDE” folder of “TC”.
  • 19.  void main() { main() c compile founds main() to start execution of program. must declare main function in every program.
  • 20.  {  braces use to define starting of coding block.
  • 21.  printf(“My First program”);  printf() : use to print any formatted string in output window of Turbo c. header file : stdio.h ( standard input output )
  • 22.  getch();  }  getch() use to get 1 character from keyboard. } define end of coding block.
  • 23.  Compile the source code with. Alt + F9 Run the program with. Crtl + F9
  • 24.  C language is totally case sensitive language.  All the statements of C language must terminate with semi colon ( ; )
  • 25.  My First program
  • 26. file type extension  C- Source file .C  application file .EXE  object file .OBJ
  • 27.  Comment lines ignore by c compiler // use for single line comment /* */ use for multiline comment
  • 28.  Integer  Float  Double  Character
  • 29.  Signed integer range -32,768 to 32,767 occupy first bit as a sigh bit. ( + / - ) memory space ( 2 bytes )
  • 30.  Unsigned integer range 0 to 65,535 not occupy any bit as sign bit. memory space ( 2 bytes ) Note : to declare unsigned integer variable must use unsigned key word before integer.
  • 31.  Use to store values with fiction point. memory space ( 4 bytes) 32 bits Double 64 bits(8 bytes) Long double 80 bits(10 bytes)
  • 32.  Default unsigned character  8 bits ( 1 byte )  Range : 0 to 255  Signed character  8 bits ( 1 byte )  Range : -128 to 127
  • 33.  int a = 10;  printf(“Value of variable a is : %d”,a);  o/p : Value of variable a is : 10
  • 34.  %d use for integer values  %f use for float values  %c use for character  %s use for String  %l use for double values  %lf use for long double values
  • 35.  Use  scanf() function  Syntax :  scanf(“format character ”, &variable name);
  • 36.  int a;  printf(“Enter value of a ”);  scanf(“%d”,&a);  printf(“Value of variable a is : %d”,a);  o/p value of variable a is : 10 Note : assume that we entered 10 from keyboard.