SlideShare a Scribd company logo
C Programming Language
Mo’meN Ali
Course Contents
‱ Introducing C.
‱ Data and C.
‱ Character Strings and formatted input/output.
‱ Operators, Expressions and Statements.
‱ C Control Statements: looping.
‱ C Control Statements: Branching and jumping.
‱ Character input/output and input validation.
‱ Functions.
‱ Arrays and Pointers.
‱ Character Strings and String Functions.
Introducing C language
1  introducing c language
The seven steps of programming
1 - Define the program objectives.
2 - Design the program.
3 - Write the code.
4 - Compile.
5 - Run the program.
6 - Test and debug the program.
7 - Maintain and modify the program.
C Strengths
‱ Efficiency.
‱ Portable.
‱ Power & Flexibility.
‱ Fast.
‱ Favourable language when interacting with hardware.
‱ Small and Compact.
C Weakness
‱ Not OOP.
‱ Programming in C needs responsibility.
How Does a C Program looks like ?!
#include <stdio.h>
int main(void)
{
printf("Concrete contains gravel and cement.n");
return 0;
}
Output
Concrete contains gravel and cement.
/* a simple program */
#include <stdio.h>
int main(void)
{
int num; /* define a variable called num */
num = 1; /* assign a value to num */
printf("I am a simple "); /* use the printf() function */
printf("computer.n");
printf("My favorite number is %d because it is first.n",num);
return 0;
}
Output
I am a simple computer.
My favorite number is 1 because it is first.
Explanation
‱ #include /* Preprocessor instructions. */
‱ int main(void) /* main is the first function to be
called always. */
‱ Statements. /* functions are made up of
statements.*/
‱ Function: a(), b(), c() /* usually we write another
functions within a program. */
// I am a comment.
/* I am the twin brother of comment. */
// fathm_ft.c -- converts 2 fathoms to feet
#include <stdio.h>
int main(void)
{
int feet, fathoms;
fathoms = 2;
feet = 6 * fathoms;
printf("There are %d feet in %d fathoms!n", feet, fathoms);
printf("Yes, I said %d feet!n", 6 * fathoms);
return 0;
}
Output
There are 12 feet in 2 fathoms!
Yes, I said 12 feet!
ISO/ANSI C Keywords
auto enum restrict unsigned
break extern return void
Case float short volatile
char for signed while
const goto sizeof _Bool
continue if static _Complex
default inline struct _Imaginary
do int switch
double long typedef
else register union

More Related Content

What's hot (20)

PPTX
What is c
Nitesh Saitwal
 
PPTX
Decision making and branching
Saranya saran
 
PPTX
Expressions using operator in c
Saranya saran
 
PPTX
Introduction to Basic C programming 02
Wingston
 
PPT
Functions and pointers_unit_4
Saranya saran
 
PPTX
C programming(Part 1)
Dr. SURBHI SAROHA
 
PDF
C programming Workshop
neosphere
 
PPSX
C programming function
argusacademy
 
PPT
Lecture 9- Control Structures 1
Md. Imran Hossain Showrov
 
PDF
46630497 fun-pointer-1
AmIt Prasad
 
PPSX
Functions in c
Innovative
 
PDF
Functions
SANTOSH RATH
 
PPT
Lecture 10 - Control Structures 2
Md. Imran Hossain Showrov
 
PPTX
C Programming Language Part 11
Rumman Ansari
 
PPT
Functions and pointers_unit_4
MKalpanaDevi
 
PPT
Lecture 6- Intorduction to C Programming
Md. Imran Hossain Showrov
 
PPT
lets play with "c"..!!! :):)
Rupendra Choudhary
 
PPT
An imperative study of c
Tushar B Kute
 
PPT
Lecture 12 - Recursion
Md. Imran Hossain Showrov
 
What is c
Nitesh Saitwal
 
Decision making and branching
Saranya saran
 
Expressions using operator in c
Saranya saran
 
Introduction to Basic C programming 02
Wingston
 
Functions and pointers_unit_4
Saranya saran
 
C programming(Part 1)
Dr. SURBHI SAROHA
 
C programming Workshop
neosphere
 
C programming function
argusacademy
 
Lecture 9- Control Structures 1
Md. Imran Hossain Showrov
 
46630497 fun-pointer-1
AmIt Prasad
 
Functions in c
Innovative
 
Functions
SANTOSH RATH
 
Lecture 10 - Control Structures 2
Md. Imran Hossain Showrov
 
C Programming Language Part 11
Rumman Ansari
 
Functions and pointers_unit_4
MKalpanaDevi
 
Lecture 6- Intorduction to C Programming
Md. Imran Hossain Showrov
 
lets play with "c"..!!! :):)
Rupendra Choudhary
 
An imperative study of c
Tushar B Kute
 
Lecture 12 - Recursion
Md. Imran Hossain Showrov
 

Similar to 1 introducing c language (20)

PPSX
Esoft Metro Campus - Certificate in c / c++ programming
Rasan Samarasinghe
 
PDF
UNIT1 PPS of C language for first year first semester
Aariz2
 
PDF
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 
DOC
Basic c
Veera Karthi
 
DOCX
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
Rajeshkumar Reddy
 
PPTX
C programming language:- Introduction to C Programming - Overview and Importa...
SebastianFrancis13
 
PPT
Fundamental of C Programming Language and Basic Input/Output Function
imtiazalijoono
 
PPS
C programming session 01
Dushmanta Nath
 
PPTX
c programming session 1.pptx
RSathyaPriyaCSEKIOT
 
PPTX
C language (1).pptxC language (1C language (1).pptx).pptx
RutviBaraiya
 
PPT
Chapter-2 edited on Programming in Can refer this ppt
ANISHYAPIT
 
PDF
C programming day#2.
Mohamed Fawzy
 
PDF
EC2311-Data Structures and C Programming
Padma Priya
 
DOCX
Report on Flutter.docx prasentation for study
HetalVasava9
 
PDF
C programming day#1
Mohamed Fawzy
 
PPT
Lecture 01 2017
Jesmin Akhter
 
PDF
C programing Tutorial
Mahira Banu
 
PPTX
C language
Priya698357
 
PDF
Introduction to C programming
Kathmandu University
 
Esoft Metro Campus - Certificate in c / c++ programming
Rasan Samarasinghe
 
UNIT1 PPS of C language for first year first semester
Aariz2
 
67404923-C-Programming-Tutorials-Doc.pdf
Rajb54
 
Basic c
Veera Karthi
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
Rajeshkumar Reddy
 
C programming language:- Introduction to C Programming - Overview and Importa...
SebastianFrancis13
 
Fundamental of C Programming Language and Basic Input/Output Function
imtiazalijoono
 
C programming session 01
Dushmanta Nath
 
c programming session 1.pptx
RSathyaPriyaCSEKIOT
 
C language (1).pptxC language (1C language (1).pptx).pptx
RutviBaraiya
 
Chapter-2 edited on Programming in Can refer this ppt
ANISHYAPIT
 
C programming day#2.
Mohamed Fawzy
 
EC2311-Data Structures and C Programming
Padma Priya
 
Report on Flutter.docx prasentation for study
HetalVasava9
 
C programming day#1
Mohamed Fawzy
 
Lecture 01 2017
Jesmin Akhter
 
C programing Tutorial
Mahira Banu
 
C language
Priya698357
 
Introduction to C programming
Kathmandu University
 
Ad

More from MomenMostafa (7)

PDF
5 c control statements looping
MomenMostafa
 
PDF
2 data and c
MomenMostafa
 
PDF
3 character strings and formatted input output
MomenMostafa
 
PDF
Storage classes, linkage & memory management
MomenMostafa
 
PDF
C programming & data structure [character strings & string functions]
MomenMostafa
 
PDF
C programming & data structure [arrays & pointers]
MomenMostafa
 
PPTX
Embedded System Practical Workshop using the ARM Processor
MomenMostafa
 
5 c control statements looping
MomenMostafa
 
2 data and c
MomenMostafa
 
3 character strings and formatted input output
MomenMostafa
 
Storage classes, linkage & memory management
MomenMostafa
 
C programming & data structure [character strings & string functions]
MomenMostafa
 
C programming & data structure [arrays & pointers]
MomenMostafa
 
Embedded System Practical Workshop using the ARM Processor
MomenMostafa
 
Ad

Recently uploaded (20)

PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Tally software_Introduction_Presentation
AditiBansal54083
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 

1 introducing c language

  • 2. Course Contents ‱ Introducing C. ‱ Data and C. ‱ Character Strings and formatted input/output. ‱ Operators, Expressions and Statements. ‱ C Control Statements: looping. ‱ C Control Statements: Branching and jumping. ‱ Character input/output and input validation. ‱ Functions.
  • 3. ‱ Arrays and Pointers. ‱ Character Strings and String Functions.
  • 6. The seven steps of programming 1 - Define the program objectives. 2 - Design the program. 3 - Write the code. 4 - Compile. 5 - Run the program. 6 - Test and debug the program. 7 - Maintain and modify the program.
  • 7. C Strengths ‱ Efficiency. ‱ Portable. ‱ Power & Flexibility. ‱ Fast. ‱ Favourable language when interacting with hardware. ‱ Small and Compact.
  • 8. C Weakness ‱ Not OOP. ‱ Programming in C needs responsibility.
  • 9. How Does a C Program looks like ?! #include <stdio.h> int main(void) { printf("Concrete contains gravel and cement.n"); return 0; }
  • 11. /* a simple program */ #include <stdio.h> int main(void) { int num; /* define a variable called num */ num = 1; /* assign a value to num */ printf("I am a simple "); /* use the printf() function */ printf("computer.n"); printf("My favorite number is %d because it is first.n",num); return 0; }
  • 12. Output I am a simple computer. My favorite number is 1 because it is first.
  • 13. Explanation ‱ #include /* Preprocessor instructions. */ ‱ int main(void) /* main is the first function to be called always. */ ‱ Statements. /* functions are made up of statements.*/ ‱ Function: a(), b(), c() /* usually we write another functions within a program. */ // I am a comment. /* I am the twin brother of comment. */
  • 14. // fathm_ft.c -- converts 2 fathoms to feet #include <stdio.h> int main(void) { int feet, fathoms; fathoms = 2; feet = 6 * fathoms; printf("There are %d feet in %d fathoms!n", feet, fathoms); printf("Yes, I said %d feet!n", 6 * fathoms); return 0; }
  • 15. Output There are 12 feet in 2 fathoms! Yes, I said 12 feet!
  • 16. ISO/ANSI C Keywords auto enum restrict unsigned break extern return void Case float short volatile char for signed while const goto sizeof _Bool continue if static _Complex default inline struct _Imaginary
  • 17. do int switch double long typedef else register union