SlideShare a Scribd company logo
A PRESENTATION ON BASIC
CONCEPT OF C PROGRAMMING
Presented by –
Md. Abdullah Al Shakil
 Introduction
 Elements of Language
 Conditional Statement
 Conditional Statement (Loops)
 One Dimensional Array
 Two Dimensional Array
 String
 Function
 Pointer
 Structure & Union
 Console Input/output
 File Handling
Day 04:
 Pointer
 Structure & Union
Day 02:
 Conditional Statement
(Loop)
 One Dimensional Array
 Two Dimensional Array
Day 03:
 String
 Function
 Console input/ output
Day 01:
 Introduction
 Elements of Language
 Conditional Statement
Day 05:
 File Handling
 Additional
Day-01
Introduction
Introductio
n
 C is a Structured Programming language
 C is the offspring of both the B programming language and a language
named BCPL.
 C is considered a mid-level language
 Mother of all programming language
Introductio
n
C was created in 1972 by Dennis Ritchie at the Bell Labs in USA as a part
of UNIX operating system. C was also used to develop some parts of this
operating system. In 1960’s “Basic Combined Programming Language
(BCPL) called B language was developed at Cambridge university.
It was not fully satisfied language. ‘B’ language was modified by denies
Ritchie was implemented at bell laboratory in 1972. C is generally
supported by most compilers. C was developed by a system programmer
Dennis Ritchie in 1972, at American Telegraph & Telecommunication (AT
& T) Bell Laboratories in New Jersey USA.
Most of the operating systems like Linux, Windows™, and Mac™ are either developed in C
language or use of this language for most parts of the operating system and the tools
coming with it.
Introductio
n
Gcc and cc in UNIX and Linux operating systems.
Borland C or Turbo C in DOS operating system or in Command
line environment of windows operating system.
“Bloodshed Dev-Cpp” integrated development environment (IDE)
gives you a complete and compact programming environment.
Assembler, Complier, Interpreter
Introductio
n
Introductio
n
Compiler is a computer program that reads a program written in one language, which is called the
source language, and translates it in to another language, which is called the target language.
The source language is a high level language and the target language is a low level language.
In general compilers can be seen as translators that translate from one language to another.
Introductio
n
Assembler is a software
or a tool that translates
Assembly language to
machine
code.
An assembler is a type of
a compiler and the
source code is written in
Assembly language.
Assembly is a human
readable language but it
typically has a one to
relationship with the
corresponding machine
code.
Introductio
n
Interpreters are not much different than
They also convert the high level language into
machine readable binary equivalents.
When an interpreter gets a high level language
code to be executed, it converts the code into an
intermediate code before converting it into the
machine code.
Each part of the code is interpreted and then execute
separately in a sequence and an error is found in a part of
the code it will top the interpretation of the code without
translating the next set of the codes.
Introductio
n
C is a general Purpose
programming
language.
Structured
Programming
Language
System Independence High Efficiency Systen Programming
Introductio
n
 Semantic
 Syntax
Introductio
n
Semantic Syntax
It is the logic or planning of
the program. Semantics can
be written in any of the
following ways:
1. Flowcharts.
2. Algorithms.
3. Pseudo codes.
It is the way of writing the
program in a particular
programming language.
Syntax changes from
to language.
Introductio
n
It is a symbolic representation of the program logic.
There are some predefined symbols used for the logic.
A flowchart shows the actual flow of the logic of a program.
The flowchart indicates the direction of flow of a process, relevant operations and computations, point of decisions and other
information which are a part of the solution.
Introductio
nFollow Chart
Introductio
n
Once a problem is been properly defined, a detailed, finite, step-by-step procedure for solving it must be developed. This
procedure is known as algorithm.
Algorithm to add two numbers –
1. Read A,B.
2. Set SUM := A+B.
3. Write SUM.
4. Exit.
Introductio
n
An intermediate state of Follow Chart and Algorithms.
Example:
main()
{
integer a,b,sum;
read in a and b;
add a & b and set it to sum;
write sum;
}
Introductio
n
/*sum of two numbers*/
#include<stdio.h> /* For printf() & scanf() */
#include<conio.h> /* For clrscr() & getch() */
main() /* Starting point of the program
execution*/
{
int a,b,sum; /* Variable Declarations */
clrscr(); /* Clear Screen */
printf("enter two numbers"); /* Request for Input */
scanf("%d %d",&a,&b); /* Input from user */
sum=a+b; /* Adding two numbers */
printf("sum=%d",sum); /* Output Sum */
getch(); /* To hold output screen */
Introductio
n
Structure of C Program
Header files contain definitions
of functions
Contain variables
The Variable can be
incorporated into any C
program by using the pre-
processor.
Introductio
n
Structure of C Program
To use any of the standard functions, the appropriate header file should be
included.
#include <stdio.h>
To define a self define header type or prototype with apostrophe
#include "mydecls.h"
• #Include
Preprocessor
Introductio
n
Structure of C Program
 Statements are terminated with semicolons.
 Indentation is ignored by the compiler.
 C is case sensitive - all keywords and Standard.
 Library functions are lowercase.
 Strings are placed in double quotes.
 Newlines are handled via n
 Programs are capable of flagging success or error, those forgetting to do so
have one or other chosen randomly!
Elements of C
Element of
C
 Keywords.
 Identifiers.
 Literals.
 Operators.
 Separators.
Element of C
They must begin with a letter.
Upper case & lower case are significant mean total is differ.
Not start with numbers
Can not contain any special character without underscore (_)
Variable name should not be a keyword.
C Tokens
Element of C
Primary data types (int, float, char)
User defined data types (enumerator, typedef)
Derived data types (array, function, pointers, structure, union)
Empty data sets. (void)
C Tokens
Element of C
Integer
Float
Double
Character
Void
C Tokens
Element of C
C Tokens
Element of C
C Tokens
Element of C
C Tokens
Operato
Unary Binary Ternary
Element of C
C Tokens
Operator
Arithmetic operator.
Unary operators.
Relational operators.
Assignment operators.
Equality operators.
Logical operators.
Conditional operators.
Bitwise operators.
Element of C
C Tokens
Operator
+
-
*
/
%
+
-
++
--
Element of C
C Tokens
Operator
>
<
=>
=<
=
+=
-=
/=
%=
==
!=
Element of C
C Tokens
Operator
&&
||
!
~
&
|
^
<<
>>
Condition ? True Statement :
False Statement
Control Statement
Conditional
Element of C
Conditional
Statement
Conditional
Statement
Condition or
Selection
If
If else
If-else if
Nested if
else
Switch
Element of C
Conditional
Statement
if(condition)
{
Statement1;
Statement2;
}
Element of C
Conditional
Statement
if(condition)
{
Statement1;
Statement2;
}
else
{
Statement1;
Statement2;
}
Element of C
Conditional
Statement
if(condition)
{
Statement1;
Statement2;
}
else if(Condition)
{
Statement1;
Statement2;
}
else)
{
Statement1;
Statement2;
}
Element of C
Conditional
Statement
switch (expression)
{
case constant1:
// statements
break;
case constant2:
// statements
break;
.
.
.
default:
// default statements
}
Element of C
Conditional
Statement
Jump
Statement
goto break continue return
THANK YOU
………………………………….
Ad

More Related Content

What's hot (20)

Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
Rokonuzzaman Rony
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
Kamal Acharya
 
C basics
C   basicsC   basics
C basics
thirumalaikumar3
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
Akhilesh Maithani
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)
Shujaat Abbas
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
Hossain Md Shakhawat
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
ABHISHEK fulwadhwa
 
C PROGRAMMING
C PROGRAMMINGC PROGRAMMING
C PROGRAMMING
Stalongiles Philip
 
Tokens_C
Tokens_CTokens_C
Tokens_C
Prabhu Govind
 
C programming language
C programming languageC programming language
C programming language
Maha lakshmi
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
vampugani
 
C language
C languageC language
C language
marar hina
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
MOHAMAD NOH AHMAD
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
Sachin Kumar
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
sanjay joshi
 
Programming in c
Programming in cProgramming in c
Programming in c
ankitjain851
 
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
Sinbad Konick
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C Language
Mohamed Elsayed
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
Gilbert NZABONITEGEKA
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
Hemantha Kulathilake
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
Rokonuzzaman Rony
 
Introduction to C Language
Introduction to C LanguageIntroduction to C Language
Introduction to C Language
Kamal Acharya
 
Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)Introduction to C Language (By: Shujaat Abbas)
Introduction to C Language (By: Shujaat Abbas)
Shujaat Abbas
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
Hossain Md Shakhawat
 
C programming language
C programming languageC programming language
C programming language
Maha lakshmi
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
vampugani
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
MOHAMAD NOH AHMAD
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
Sachin Kumar
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
sanjay joshi
 
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
Sinbad Konick
 
A brief introduction to C Language
A brief introduction to C LanguageA brief introduction to C Language
A brief introduction to C Language
Mohamed Elsayed
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
Hemantha Kulathilake
 

Similar to C programming slide day 01 uploadd by md abdullah al shakil (20)

C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
aaravSingh41
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
SanketShah544615
 
C Lang notes.ppt
C Lang notes.pptC Lang notes.ppt
C Lang notes.ppt
ShivanadhuniBhanuPra
 
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
Rajeshkumar Reddy
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
C programme presentation
C programme presentationC programme presentation
C programme presentation
DharmaKumariBhandari
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
Kuntal Bhowmick
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
Mithun DSouza
 
Unit-1_c.pptx you from the heart of the day revision
Unit-1_c.pptx you from the heart of the day revisionUnit-1_c.pptx you from the heart of the day revision
Unit-1_c.pptx you from the heart of the day revision
MohammedAnas871930
 
Introduction to c language
Introduction to c language Introduction to c language
Introduction to c language
BAKRANIYA KALPESH
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
ManiMala75
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
ManiMala75
 
C programming language Reference Note
C programming language Reference NoteC programming language Reference Note
C programming language Reference Note
Chetan Thapa Magar
 
Programming in C and Decision Making Branching
Programming in C and Decision Making BranchingProgramming in C and Decision Making Branching
Programming in C and Decision Making Branching
Rvishnupriya2
 
Programming in C & Decision Making Branching
Programming in C & Decision Making BranchingProgramming in C & Decision Making Branching
Programming in C & Decision Making Branching
VishnuPriya810389
 
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
 
Programming in C
Programming in CProgramming in C
Programming in C
Rvishnupriya2
 
Programming in c
Programming in cProgramming in c
Programming in c
vishnu973656
 
What is turbo c and how it works
What is turbo c and how it worksWhat is turbo c and how it works
What is turbo c and how it works
Mark John Lado, MIT
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
aaravSingh41
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
SanketShah544615
 
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
Rajeshkumar Reddy
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
Mugilvannan11
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
Mithun DSouza
 
Unit-1_c.pptx you from the heart of the day revision
Unit-1_c.pptx you from the heart of the day revisionUnit-1_c.pptx you from the heart of the day revision
Unit-1_c.pptx you from the heart of the day revision
MohammedAnas871930
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
ManiMala75
 
490450755-Chapter-2.ppt
490450755-Chapter-2.ppt490450755-Chapter-2.ppt
490450755-Chapter-2.ppt
ManiMala75
 
C programming language Reference Note
C programming language Reference NoteC programming language Reference Note
C programming language Reference Note
Chetan Thapa Magar
 
Programming in C and Decision Making Branching
Programming in C and Decision Making BranchingProgramming in C and Decision Making Branching
Programming in C and Decision Making Branching
Rvishnupriya2
 
Programming in C & Decision Making Branching
Programming in C & Decision Making BranchingProgramming in C & Decision Making Branching
Programming in C & Decision Making Branching
VishnuPriya810389
 
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
 
What is turbo c and how it works
What is turbo c and how it worksWhat is turbo c and how it works
What is turbo c and how it works
Mark John Lado, MIT
 
Ad

Recently uploaded (15)

Cloud-to-cloud Migration presentation.pptx
Cloud-to-cloud Migration presentation.pptxCloud-to-cloud Migration presentation.pptx
Cloud-to-cloud Migration presentation.pptx
marketing140789
 
Breaking Down the Latest Spectrum Internet Plans.pdf
Breaking Down the Latest Spectrum Internet Plans.pdfBreaking Down the Latest Spectrum Internet Plans.pdf
Breaking Down the Latest Spectrum Internet Plans.pdf
Internet Bundle Now
 
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdfGiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
Giacomo Vacca
 
ProjectArtificial Intelligence Good or Evil.pptx
ProjectArtificial Intelligence Good or Evil.pptxProjectArtificial Intelligence Good or Evil.pptx
ProjectArtificial Intelligence Good or Evil.pptx
OlenaKotovska
 
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness GuideThe Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
russellpeter1995
 
IoT PPT introduction to internet of things
IoT PPT introduction to internet of thingsIoT PPT introduction to internet of things
IoT PPT introduction to internet of things
VaishnaviPatil3995
 
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
Taqyea
 
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
emestica1
 
Paper: World Game (s) Great Redesign.pdf
Paper: World Game (s) Great Redesign.pdfPaper: World Game (s) Great Redesign.pdf
Paper: World Game (s) Great Redesign.pdf
Steven McGee
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Presentation Mehdi Monitorama 2022 Cancer and Monitoring
Presentation Mehdi Monitorama 2022 Cancer and MonitoringPresentation Mehdi Monitorama 2022 Cancer and Monitoring
Presentation Mehdi Monitorama 2022 Cancer and Monitoring
mdaoudi
 
introduction to html and cssIntroHTML.ppt
introduction to html and cssIntroHTML.pptintroduction to html and cssIntroHTML.ppt
introduction to html and cssIntroHTML.ppt
SherifElGohary7
 
AG-FIRMA Ai Agent for Agriculture | RAG ..
AG-FIRMA Ai Agent for Agriculture  | RAG ..AG-FIRMA Ai Agent for Agriculture  | RAG ..
AG-FIRMA Ai Agent for Agriculture | RAG ..
Anass Nabil
 
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
Taqyea
 
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
werhkr1
 
Cloud-to-cloud Migration presentation.pptx
Cloud-to-cloud Migration presentation.pptxCloud-to-cloud Migration presentation.pptx
Cloud-to-cloud Migration presentation.pptx
marketing140789
 
Breaking Down the Latest Spectrum Internet Plans.pdf
Breaking Down the Latest Spectrum Internet Plans.pdfBreaking Down the Latest Spectrum Internet Plans.pdf
Breaking Down the Latest Spectrum Internet Plans.pdf
Internet Bundle Now
 
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdfGiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdf
Giacomo Vacca
 
ProjectArtificial Intelligence Good or Evil.pptx
ProjectArtificial Intelligence Good or Evil.pptxProjectArtificial Intelligence Good or Evil.pptx
ProjectArtificial Intelligence Good or Evil.pptx
OlenaKotovska
 
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness GuideThe Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
The Hidden Risks of Hiring Hackers to Change Grades: An Awareness Guide
russellpeter1995
 
IoT PPT introduction to internet of things
IoT PPT introduction to internet of thingsIoT PPT introduction to internet of things
IoT PPT introduction to internet of things
VaishnaviPatil3995
 
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
美国文凭明尼苏达大学莫里斯分校毕业证范本UMM学位证书
Taqyea
 
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
CompTIA-Security-Study-Guide-with-over-500-Practice-Test-Questions-Exam-SY0-7...
emestica1
 
Paper: World Game (s) Great Redesign.pdf
Paper: World Game (s) Great Redesign.pdfPaper: World Game (s) Great Redesign.pdf
Paper: World Game (s) Great Redesign.pdf
Steven McGee
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Presentation Mehdi Monitorama 2022 Cancer and Monitoring
Presentation Mehdi Monitorama 2022 Cancer and MonitoringPresentation Mehdi Monitorama 2022 Cancer and Monitoring
Presentation Mehdi Monitorama 2022 Cancer and Monitoring
mdaoudi
 
introduction to html and cssIntroHTML.ppt
introduction to html and cssIntroHTML.pptintroduction to html and cssIntroHTML.ppt
introduction to html and cssIntroHTML.ppt
SherifElGohary7
 
AG-FIRMA Ai Agent for Agriculture | RAG ..
AG-FIRMA Ai Agent for Agriculture  | RAG ..AG-FIRMA Ai Agent for Agriculture  | RAG ..
AG-FIRMA Ai Agent for Agriculture | RAG ..
Anass Nabil
 
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
学生卡英国RCA毕业证皇家艺术学院电子毕业证学历证书
Taqyea
 
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
DEF CON 25 - Whitney-Merrill-and-Terrell-McSweeny-Tick-Tick-Boom-Tech-and-the...
werhkr1
 
Ad

C programming slide day 01 uploadd by md abdullah al shakil

  • 1. A PRESENTATION ON BASIC CONCEPT OF C PROGRAMMING Presented by – Md. Abdullah Al Shakil
  • 2.  Introduction  Elements of Language  Conditional Statement  Conditional Statement (Loops)  One Dimensional Array  Two Dimensional Array  String  Function  Pointer  Structure & Union  Console Input/output  File Handling
  • 3. Day 04:  Pointer  Structure & Union Day 02:  Conditional Statement (Loop)  One Dimensional Array  Two Dimensional Array Day 03:  String  Function  Console input/ output Day 01:  Introduction  Elements of Language  Conditional Statement Day 05:  File Handling  Additional
  • 6. Introductio n  C is a Structured Programming language  C is the offspring of both the B programming language and a language named BCPL.  C is considered a mid-level language  Mother of all programming language
  • 7. Introductio n C was created in 1972 by Dennis Ritchie at the Bell Labs in USA as a part of UNIX operating system. C was also used to develop some parts of this operating system. In 1960’s “Basic Combined Programming Language (BCPL) called B language was developed at Cambridge university. It was not fully satisfied language. ‘B’ language was modified by denies Ritchie was implemented at bell laboratory in 1972. C is generally supported by most compilers. C was developed by a system programmer Dennis Ritchie in 1972, at American Telegraph & Telecommunication (AT & T) Bell Laboratories in New Jersey USA. Most of the operating systems like Linux, Windows™, and Mac™ are either developed in C language or use of this language for most parts of the operating system and the tools coming with it.
  • 8. Introductio n Gcc and cc in UNIX and Linux operating systems. Borland C or Turbo C in DOS operating system or in Command line environment of windows operating system. “Bloodshed Dev-Cpp” integrated development environment (IDE) gives you a complete and compact programming environment.
  • 10. Introductio n Compiler is a computer program that reads a program written in one language, which is called the source language, and translates it in to another language, which is called the target language. The source language is a high level language and the target language is a low level language. In general compilers can be seen as translators that translate from one language to another.
  • 11. Introductio n Assembler is a software or a tool that translates Assembly language to machine code. An assembler is a type of a compiler and the source code is written in Assembly language. Assembly is a human readable language but it typically has a one to relationship with the corresponding machine code.
  • 12. Introductio n Interpreters are not much different than They also convert the high level language into machine readable binary equivalents. When an interpreter gets a high level language code to be executed, it converts the code into an intermediate code before converting it into the machine code. Each part of the code is interpreted and then execute separately in a sequence and an error is found in a part of the code it will top the interpretation of the code without translating the next set of the codes.
  • 13. Introductio n C is a general Purpose programming language. Structured Programming Language System Independence High Efficiency Systen Programming
  • 15. Introductio n Semantic Syntax It is the logic or planning of the program. Semantics can be written in any of the following ways: 1. Flowcharts. 2. Algorithms. 3. Pseudo codes. It is the way of writing the program in a particular programming language. Syntax changes from to language.
  • 16. Introductio n It is a symbolic representation of the program logic. There are some predefined symbols used for the logic. A flowchart shows the actual flow of the logic of a program. The flowchart indicates the direction of flow of a process, relevant operations and computations, point of decisions and other information which are a part of the solution.
  • 18. Introductio n Once a problem is been properly defined, a detailed, finite, step-by-step procedure for solving it must be developed. This procedure is known as algorithm. Algorithm to add two numbers – 1. Read A,B. 2. Set SUM := A+B. 3. Write SUM. 4. Exit.
  • 19. Introductio n An intermediate state of Follow Chart and Algorithms. Example: main() { integer a,b,sum; read in a and b; add a & b and set it to sum; write sum; }
  • 20. Introductio n /*sum of two numbers*/ #include<stdio.h> /* For printf() & scanf() */ #include<conio.h> /* For clrscr() & getch() */ main() /* Starting point of the program execution*/ { int a,b,sum; /* Variable Declarations */ clrscr(); /* Clear Screen */ printf("enter two numbers"); /* Request for Input */ scanf("%d %d",&a,&b); /* Input from user */ sum=a+b; /* Adding two numbers */ printf("sum=%d",sum); /* Output Sum */ getch(); /* To hold output screen */
  • 21. Introductio n Structure of C Program Header files contain definitions of functions Contain variables The Variable can be incorporated into any C program by using the pre- processor.
  • 22. Introductio n Structure of C Program To use any of the standard functions, the appropriate header file should be included. #include <stdio.h> To define a self define header type or prototype with apostrophe #include "mydecls.h" • #Include Preprocessor
  • 23. Introductio n Structure of C Program  Statements are terminated with semicolons.  Indentation is ignored by the compiler.  C is case sensitive - all keywords and Standard.  Library functions are lowercase.  Strings are placed in double quotes.  Newlines are handled via n  Programs are capable of flagging success or error, those forgetting to do so have one or other chosen randomly!
  • 25. Element of C  Keywords.  Identifiers.  Literals.  Operators.  Separators.
  • 26. Element of C They must begin with a letter. Upper case & lower case are significant mean total is differ. Not start with numbers Can not contain any special character without underscore (_) Variable name should not be a keyword. C Tokens
  • 27. Element of C Primary data types (int, float, char) User defined data types (enumerator, typedef) Derived data types (array, function, pointers, structure, union) Empty data sets. (void) C Tokens
  • 29. Element of C C Tokens
  • 30. Element of C C Tokens
  • 31. Element of C C Tokens Operato Unary Binary Ternary
  • 32. Element of C C Tokens Operator Arithmetic operator. Unary operators. Relational operators. Assignment operators. Equality operators. Logical operators. Conditional operators. Bitwise operators.
  • 33. Element of C C Tokens Operator + - * / % + - ++ --
  • 34. Element of C C Tokens Operator > < => =< = += -= /= %= == !=
  • 35. Element of C C Tokens Operator && || ! ~ & | ^ << >> Condition ? True Statement : False Statement
  • 37. Element of C Conditional Statement Conditional Statement Condition or Selection If If else If-else if Nested if else Switch
  • 40. Element of C Conditional Statement if(condition) { Statement1; Statement2; } else if(Condition) { Statement1; Statement2; } else) { Statement1; Statement2; }
  • 41. Element of C Conditional Statement switch (expression) { case constant1: // statements break; case constant2: // statements break; . . . default: // default statements }
  翻译: