SlideShare a Scribd company logo
C Programming
language
Overview
§
Computer System
§
Architecture of Computer System
§
Need of C Programming Language
§
History of C
§
Tokens in C
Computer System
§
Is a collection of related Components that have all
been design to work together Smoothly
§
Bits and Byte
§
Use of Computer
Internal Architecture of Computer
Types of Software
Communication between User
and Machine
User want to interact with machine but
machine only knows language in the
form of 0’s and 1’s i.e. Bit (Binary
Language)
User Machine
•
So Binary language is also known as Machine level language but it is difficult to
understand because it is in the form of bits.
•
So user want language that is close to user and we know it as High level language .
•
High level language is just like English language, all instructions are in friendly
approach.
Need of Translator
•
Computer only understands Binary language and user only understands
High level language.
•
So there are two types of translators
1)Compiler
2)Interpreter
Difference between Compiler and Interpreter
Compiler Interpreter
Compiler Takes Entire program as
input
Interpreter Takes Single instruction
as input .
Intermediate Object Code is
Generated
No Intermediate Object Code is
Generated
Conditional Control Statements are
Executes faster
Conditional Control Statements are
Executes slower
Memory Requirement : More
(Since Object Code is Generated)
Memory Requirement is Less
Program need not be compiled
every time
Every time higher level program is
converted into lower level program
Errors are displayed after entire
program is checked
Errors are displayed for every
instruction interpreted (if any)
Example : C Compiler Example : BASIC
8
History of programming language
low-level languages:-
•
Those are machine languages and machine-
dependent.
•
Fully binary, and symbolic so not code efficient.
•
Such languages are-
§Fortran
§Algol 60
§Cobol
§Basic
§Simula 67
§Pascal
Need of C Language
C is called as Middle level language.
§
Behaves as High Level Language through Functions - gives a
modular programming
§
It gives access to the low level memory through Pointers
§
As its a combination of these two aspects, its neither a High
Level nor a Low level language ,so C is Middle Level
Language.
History of C Language
•
Developed at Bell Laboratories in 1972 by Dennis Ritchie.
•
Features were derived from earlier language called “B” (Basic
Combined Programming Language – BCPL)which is developed
by Ken Thompson in 1970’s.
•
Invented for implementing UNIX operating system
C Programming Basics
Each language is made up of two parts,
§
Vocabulary
§
Grammar
In programming language,
§
Vocabulary means Tokens
§
Grammar means Syntax
C Tokens
– Basic buildings blocks which are constructed together to
write a C program.
– Identifiers
– Variables
– Constants
– Character Set
– Keywords
– Data types
– Operators
Identifier
• Unique name given to identify units
• E.g.int Num
Num is identifier given to integer variable
Variable
•
Name given to the location in a memory which is used to hold
the value.
•
The value of the C variable may get change in the program.
•
C variable can hold values like integer, float point, character
etc.
•
E.g. Age, height etc.
Constant
•
Name given to the location in a memory which is used to hold
the value .
•
Values can not be modified by the program once they are
defined.
•
Constant might be belonging to any type like integer, float
point, character etc.
•
E.g. Pi value=3.14
Character set
C language have collection of different character set which contain
Alphabets A-Z, a-z
Digits 0-9
Special symbols !,@,#,$,%,^,&,*,(,),_,+,=,-
Keywords
• Keywords are pre-defined words in a C compiler.
• Also known as Reserved words.
• Each keyword is meant to perform a specific function in a C
program.
• Since keywords are referred names for compiler, they can’t be
used as variable name.
• C language have 32 keywords.
Keywords
Datatypes
Range of Data type
Declaration of Variable
Syntax- Data_type variable_name;
•
Integer data types:
§
Keyword int is used for declaring the variable with integer type.
§
For example: int var1;
•
Floating data types:
§
Variables of floating types can hold real values(numbers).
§
Keywords either float or double is used for declaring floating type
variable.
§
For example: float var2;
•
Character types:
§
Keyword char is used for declaring the variable of character type.
§
For example: char var4='h';
Operators in C
• Symbol that tells the compiler to perform specific
mathematical or logical operations.
• Types of operators-
§
Arithmetic Operators
§
Relational Operators
§
Increment Operator
§
Decrement Operator
§
Logical Operators
§
Conditional Operator
Arithmetic Operators
•
Used to perform arithmetic operations.
Operator Description Example(A=10,B=20)
+ Adds two operands A + B will give 30
- Subtracts second operand from the first A - B will give -10
* Multiplies both operands A * B will give 200
/ Divides numerator by de-numerator B / A will give 2
% Modulus Operator and remainder of after an
integer division
B % A will give 0
Relational Operators
Operator Description Example(A=10,B=20)
== Checks two operands are equal or not, if yes then condition
becomes true.
(A == B) is not true.
!= Checks two operands are equal or not, if values are not
equal then condition becomes true.
(A != B) is true.
> Checks left operand is greater than right operand, if yes
then condition becomes true.
(A > B) is not true.
< Checks left operand is less than right operand, if yes then
condition becomes true.
(A < B) is true.
>= Checks left operand is greater than or equal to the right
operand, if yes then condition becomes true.
(A >= B) is not true.
<= Checks left operand is less than or equal to right operand, if
yes then condition becomes true.
(A <= B) is true.
Logical Operators
•
They evaluate each operation result in terms of 0 and 1.
•
Logical Operators are three type as
– AND- (&&)
– OR-(||)
– NOT-(!)
Increment Operator(++)
•
Increment operator increase the value of subsequent by 1. value may be
increase according to the programmer.
•
Increment operator are two types as follows :
– Post increment
– Pre increment
Post increment Pre increment
A=10
B=A++
A=11 A=10
B=++A
A=11
B=10 B=11
Decrement Operator(--)
•
Decrement operators decrease the value to one, two and so on.
•
Two type as,
– Post decrement
– Pre decrement
Post Decrement Pre Decrement
A=10
B=A--
A=9 A=10
B=--A
A=9
B=10 B=9
Conditional Operator(?:)
•
Ternary operator
•
Syntax:
condition ? result1 : result2
•
If the condition is true, result1 is returned else result2 is
returned.
Largest no among 3 no's using
conditional Operator
     Max=(A>B) ? ((A>C)?A:C) : ((B>C)?B:C) 

More Related Content

What's hot

Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chart
Prasanna R Kovath
 
C presentation book
C presentation bookC presentation book
C presentation book
krunal1210
 
Data types in C
Data types in CData types in C
Data types in C
Ansh Kashyap
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
Himanshu Kaushik
 
tally ppt.pptx
tally ppt.pptxtally ppt.pptx
tally ppt.pptx
sourav mathur
 
C Language
C LanguageC Language
C Language
Aakash Singh
 
Programming
ProgrammingProgramming
Programming
Leo Simon Anfone
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
Leela Koneru
 
Computer Programming- Lecture 5
Computer Programming- Lecture 5 Computer Programming- Lecture 5
Computer Programming- Lecture 5
Dr. Md. Shohel Sayeed
 
Basic Concepts Of Information Technology (IT)
Basic Concepts Of Information Technology (IT)Basic Concepts Of Information Technology (IT)
Basic Concepts Of Information Technology (IT)
Md Waresul Islam
 
Basic Structure of C Language and Related Term
Basic Structure of C Language  and Related TermBasic Structure of C Language  and Related Term
Basic Structure of C Language and Related Term
MuhammadWaseem305
 
MSCIT Unit 1
MSCIT Unit 1MSCIT Unit 1
MSCIT Unit 1
SHRIBALAJIINFOTECH
 
Prgramming paradigms
Prgramming paradigmsPrgramming paradigms
Prgramming paradigms
Anirudh Chauhan
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
Ms word shortcut keys
Ms word shortcut keysMs word shortcut keys
Ms word shortcut keys
DalbirAntil
 
Excel
ExcelExcel
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
cios135
 
C language ppt
C language pptC language ppt
C language ppt
Ğäùråv Júñêjå
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
younganand
 

What's hot (20)

Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chart
 
C presentation book
C presentation bookC presentation book
C presentation book
 
Data types in C
Data types in CData types in C
Data types in C
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Excel Lesson
Excel  LessonExcel  Lesson
Excel Lesson
 
tally ppt.pptx
tally ppt.pptxtally ppt.pptx
tally ppt.pptx
 
C Language
C LanguageC Language
C Language
 
Programming
ProgrammingProgramming
Programming
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
Computer Programming- Lecture 5
Computer Programming- Lecture 5 Computer Programming- Lecture 5
Computer Programming- Lecture 5
 
Basic Concepts Of Information Technology (IT)
Basic Concepts Of Information Technology (IT)Basic Concepts Of Information Technology (IT)
Basic Concepts Of Information Technology (IT)
 
Basic Structure of C Language and Related Term
Basic Structure of C Language  and Related TermBasic Structure of C Language  and Related Term
Basic Structure of C Language and Related Term
 
MSCIT Unit 1
MSCIT Unit 1MSCIT Unit 1
MSCIT Unit 1
 
Prgramming paradigms
Prgramming paradigmsPrgramming paradigms
Prgramming paradigms
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Ms word shortcut keys
Ms word shortcut keysMs word shortcut keys
Ms word shortcut keys
 
Excel
ExcelExcel
Excel
 
Tutorial 2
Tutorial 2Tutorial 2
Tutorial 2
 
C language ppt
C language pptC language ppt
C language ppt
 
Ppt on visual basics
Ppt on visual basicsPpt on visual basics
Ppt on visual basics
 

Similar to Basics Of C Programming For Beginners In Easiest Way

SPC Unit 2
SPC Unit 2SPC Unit 2
SPC Unit 2
SIMONTHOMAS S
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
8759000398
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
Dr.Florence Dayana
 
Basics of C
Basics of CBasics of C
Basics of C
pksahoo9
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
Vijayalaxmi Wakode
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
RohanJoshi290109
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
SangramNayak23
 
Basics of c
Basics of cBasics of c
Basics of c
Saidaiah Bandi
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
gprasannakumarPrasan
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
TanuGohel
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
ssuserc8fc691
 
Funa-C.ppt
Funa-C.pptFuna-C.ppt
Funa-C.ppt
ssuser5ad1571
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
MEHALAS3
 
Basics of C (1).ppt
Basics of C (1).pptBasics of C (1).ppt
Basics of C (1).ppt
SteveIrwin25
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
kiran833055
 
Basics of C (1).ppt
Basics of C (1).pptBasics of C (1).ppt
Basics of C (1).ppt
HeshamMohamed855920
 
C programming basic pdf.ppt
C programming basic pdf.pptC programming basic pdf.ppt
C programming basic pdf.ppt
KauserJahan6
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
ChiranjeevivarmaP
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
nikitha992646
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
KrishKumar690406
 

Similar to Basics Of C Programming For Beginners In Easiest Way (20)

SPC Unit 2
SPC Unit 2SPC Unit 2
SPC Unit 2
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
M.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C LanguageM.Florence Dayana / Basics of C Language
M.Florence Dayana / Basics of C Language
 
Basics of C
Basics of CBasics of C
Basics of C
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of c
Basics of cBasics of c
Basics of c
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Funa-C.ppt
Funa-C.pptFuna-C.ppt
Funa-C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C (1).ppt
Basics of C (1).pptBasics of C (1).ppt
Basics of C (1).ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C (1).ppt
Basics of C (1).pptBasics of C (1).ppt
Basics of C (1).ppt
 
C programming basic pdf.ppt
C programming basic pdf.pptC programming basic pdf.ppt
C programming basic pdf.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 
Basics of C.ppt
Basics of C.pptBasics of C.ppt
Basics of C.ppt
 

Recently uploaded

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 

Recently uploaded (20)

KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 

Basics Of C Programming For Beginners In Easiest Way

  • 2. Overview § Computer System § Architecture of Computer System § Need of C Programming Language § History of C § Tokens in C
  • 3. Computer System § Is a collection of related Components that have all been design to work together Smoothly § Bits and Byte § Use of Computer
  • 6. Communication between User and Machine User want to interact with machine but machine only knows language in the form of 0’s and 1’s i.e. Bit (Binary Language) User Machine • So Binary language is also known as Machine level language but it is difficult to understand because it is in the form of bits. • So user want language that is close to user and we know it as High level language . • High level language is just like English language, all instructions are in friendly approach.
  • 7. Need of Translator • Computer only understands Binary language and user only understands High level language. • So there are two types of translators 1)Compiler 2)Interpreter
  • 8. Difference between Compiler and Interpreter Compiler Interpreter Compiler Takes Entire program as input Interpreter Takes Single instruction as input . Intermediate Object Code is Generated No Intermediate Object Code is Generated Conditional Control Statements are Executes faster Conditional Control Statements are Executes slower Memory Requirement : More (Since Object Code is Generated) Memory Requirement is Less Program need not be compiled every time Every time higher level program is converted into lower level program Errors are displayed after entire program is checked Errors are displayed for every instruction interpreted (if any) Example : C Compiler Example : BASIC 8
  • 9. History of programming language low-level languages:- • Those are machine languages and machine- dependent. • Fully binary, and symbolic so not code efficient. • Such languages are- §Fortran §Algol 60 §Cobol §Basic §Simula 67 §Pascal
  • 10. Need of C Language C is called as Middle level language. § Behaves as High Level Language through Functions - gives a modular programming § It gives access to the low level memory through Pointers § As its a combination of these two aspects, its neither a High Level nor a Low level language ,so C is Middle Level Language.
  • 11. History of C Language • Developed at Bell Laboratories in 1972 by Dennis Ritchie. • Features were derived from earlier language called “B” (Basic Combined Programming Language – BCPL)which is developed by Ken Thompson in 1970’s. • Invented for implementing UNIX operating system
  • 12. C Programming Basics Each language is made up of two parts, § Vocabulary § Grammar In programming language, § Vocabulary means Tokens § Grammar means Syntax
  • 13. C Tokens – Basic buildings blocks which are constructed together to write a C program. – Identifiers – Variables – Constants – Character Set – Keywords – Data types – Operators
  • 14. Identifier • Unique name given to identify units • E.g.int Num Num is identifier given to integer variable
  • 15. Variable • Name given to the location in a memory which is used to hold the value. • The value of the C variable may get change in the program. • C variable can hold values like integer, float point, character etc. • E.g. Age, height etc.
  • 16. Constant • Name given to the location in a memory which is used to hold the value . • Values can not be modified by the program once they are defined. • Constant might be belonging to any type like integer, float point, character etc. • E.g. Pi value=3.14
  • 17. Character set C language have collection of different character set which contain Alphabets A-Z, a-z Digits 0-9 Special symbols !,@,#,$,%,^,&,*,(,),_,+,=,-
  • 18. Keywords • Keywords are pre-defined words in a C compiler. • Also known as Reserved words. • Each keyword is meant to perform a specific function in a C program. • Since keywords are referred names for compiler, they can’t be used as variable name. • C language have 32 keywords.
  • 22. Declaration of Variable Syntax- Data_type variable_name; • Integer data types: § Keyword int is used for declaring the variable with integer type. § For example: int var1; • Floating data types: § Variables of floating types can hold real values(numbers). § Keywords either float or double is used for declaring floating type variable. § For example: float var2; • Character types: § Keyword char is used for declaring the variable of character type. § For example: char var4='h';
  • 23. Operators in C • Symbol that tells the compiler to perform specific mathematical or logical operations. • Types of operators- § Arithmetic Operators § Relational Operators § Increment Operator § Decrement Operator § Logical Operators § Conditional Operator
  • 24. Arithmetic Operators • Used to perform arithmetic operations. Operator Description Example(A=10,B=20) + Adds two operands A + B will give 30 - Subtracts second operand from the first A - B will give -10 * Multiplies both operands A * B will give 200 / Divides numerator by de-numerator B / A will give 2 % Modulus Operator and remainder of after an integer division B % A will give 0
  • 25. Relational Operators Operator Description Example(A=10,B=20) == Checks two operands are equal or not, if yes then condition becomes true. (A == B) is not true. != Checks two operands are equal or not, if values are not equal then condition becomes true. (A != B) is true. > Checks left operand is greater than right operand, if yes then condition becomes true. (A > B) is not true. < Checks left operand is less than right operand, if yes then condition becomes true. (A < B) is true. >= Checks left operand is greater than or equal to the right operand, if yes then condition becomes true. (A >= B) is not true. <= Checks left operand is less than or equal to right operand, if yes then condition becomes true. (A <= B) is true.
  • 26. Logical Operators • They evaluate each operation result in terms of 0 and 1. • Logical Operators are three type as – AND- (&&) – OR-(||) – NOT-(!)
  • 27. Increment Operator(++) • Increment operator increase the value of subsequent by 1. value may be increase according to the programmer. • Increment operator are two types as follows : – Post increment – Pre increment Post increment Pre increment A=10 B=A++ A=11 A=10 B=++A A=11 B=10 B=11
  • 28. Decrement Operator(--) • Decrement operators decrease the value to one, two and so on. • Two type as, – Post decrement – Pre decrement Post Decrement Pre Decrement A=10 B=A-- A=9 A=10 B=--A A=9 B=10 B=9
  • 29. Conditional Operator(?:) • Ternary operator • Syntax: condition ? result1 : result2 • If the condition is true, result1 is returned else result2 is returned.
  • 30. Largest no among 3 no's using conditional Operator      Max=(A>B) ? ((A>C)?A:C) : ((B>C)?B:C) 

Editor's Notes

  1. Summarize presentation content by restating the important points from the lessons. What do you want the audience to remember when they leave your presentation? Save your presentation to a video for easy distribution (To create a video, click the File tab, and then click Share.  Under File Types, click Create a Video.) &amp;lt;number&amp;gt; 3/7/16
  2. Summarize presentation content by restating the important points from the lessons. What do you want the audience to remember when they leave your presentation? Save your presentation to a video for easy distribution (To create a video, click the File tab, and then click Share.  Under File Types, click Create a Video.) &amp;lt;number&amp;gt; 3/7/16
  3. Summarize presentation content by restating the important points from the lessons. What do you want the audience to remember when they leave your presentation? Save your presentation to a video for easy distribution (To create a video, click the File tab, and then click Share.  Under File Types, click Create a Video.) &amp;lt;number&amp;gt; 3/7/16
  4. Summarize presentation content by restating the important points from the lessons. What do you want the audience to remember when they leave your presentation? Save your presentation to a video for easy distribution (To create a video, click the File tab, and then click Share.  Under File Types, click Create a Video.) &amp;lt;number&amp;gt; 3/7/16
  5. Summarize presentation content by restating the important points from the lessons. What do you want the audience to remember when they leave your presentation? Save your presentation to a video for easy distribution (To create a video, click the File tab, and then click Share.  Under File Types, click Create a Video.) &amp;lt;number&amp;gt; 3/7/16