SlideShare a Scribd company logo
BASICS OF C
Session 1
OBJECTIVES
• Differentiate between command, Program, and Software
• Explain the beginning of C
• Explain when and why C is used
• Discuss the c program structure
• Discuss Algorithm
• Draw Flowcharts
• List the symbol used in flowcharts
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
2
COMMAND, PROGRAM AND SOFTWARE
• In computing, a command is a directive to a computer program acting as an
interpreter of some kind, in order to perform a specific task.
• A program is a set of instructions(commands) written in computer language to
provide solution for a particular problem using computing devices is commonly
referred as Program.
• software is a collection of individual programs well packaged to run on a computer.
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
3
COMMAND, PROGRAM AND SOFTWARE
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
4
Software
Program Program
Command Command Command Command
BEGINNING OF C
• C programming language was invented by
Dennis Ritchie at the Bell Laboratories in 1972.
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
5
APPLICATION AREAS OF C PROGRAMMING
• C was initially used for Systems programming
• A System programs forms a portion of the operating system of the computer or it
support utilities
• Operating systems, Interpreters, Editors, Assembly programs are usually called
system programs
• The UNIX operating system was developed using C
• There are C compilers are available for almost all types of PC’s
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
6
MIDDLE LEVEL LANGUAGE
C is called middle-level language because it is actually bind the gap between a
machine level language and high-level languages. User can use c language to do
System Programming (for writing operating system) as well as Application
Programming (for generate menu driven customer billing system ).
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
7
STRUCTURED LANGUAGE
• C is called a structured programming language because to solve a large problem
• C allows compartmentalization of code and data
• C programming language divides the problem into smaller modules called
functions or procedures each of which handles a particular responsibility
• The program which solves the entire problem is a collection of such functions
For Ex: We have to develop a calculator . So we must have to divide programs into
functions of Addition, Subtraction, Multiplication, Division etc.
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
8
ABOUT C PROGRAMMING (keywords)
• There are 32 Keywords in C
• Keywords are those words whose meaning is already defined by Compiler
• Keywords cannot be used as a variable or function name
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
9
C PROGRAMMING STRUCTURE [ main() ]
 C programs are divided into units called functions
 Identify the start of program
 Every C program has a main ()
 Main() is a keyword , we must not used it for any other variable
 4 common ways of main declaration
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
10
C PROGRAMMING STRUCTURE[Delimiters]
• A delimiter is one or more characters that separates text strings
• Common delimiters are commas (,), semicolon (;), quotes ( ", ' ), braces ({}), pipes (|),
or slashes ( /  )
• C programming Delimiters are as follows
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
11
Delimiter Symbol Use
Colon : Useful for label
Semicolon ; Terminates statements
Parenthesis () Used in expression and function
Square brackets [] Used for array declaration
Curly braces {} Scope of statement
Hash # Preprocessor directive
Comma , variable separator
#include<stdio.h>
void main()
{
int a,b,c[10];
printf("hi");
}
C PROGRAMMING STRUCTURE[Comment]
• In computer programming, a comment is a programmer-readable explanation or
annotation in the source code of a computer program.
• They are added with the purpose of making the source code easier for humans to
understand, and are generally ignored by compilers and interpreters.
• In C Comment begin with /* and are terminated with */
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
12
THE C LIBRARY
• All C compilers come with a standard library of functions
• A function written by a programmer can be placed in the library and used
when required
• Some compilers allow functions to be added in the standard library
• Some compilers require a separate library to be created
• C Standard library functions or simply C Library functions are
inbuilt functions in C programming.
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
13
COMPILING AND RUNNING A PROGRAM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
14
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
What is algorithm ?
Algorithm is a set of instruction performed by programmer to solve a problems
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
15
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
16
3. Process the information
1. Understand the problem
clearly
4. Arrive the solution
2. Understand the problem
clearly
To solve problems
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
17
• Pseudocode is a simple way of writing programming code in English.
• Pseudocode is not actual programming language.
• For Example:
1. Start Program
2. Enter two numbers, A, B
3. Add the numbers together
4. Print Sum
5. End Program
Each pseudocode starts with a BEGIN/START To show some value ,
the word DISPLAY/PRINT is used The pseudocode finishes with an END
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
18
• What is Flowchart ?
Flowchart is a diagrammatic representation of an algorithm. Flowchart are very helpful
in writing program and explaining program to others.
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
19
• Flowchart Symbol
Different symbols are used for different states in flowchart, For example: Input /
Output and decision making has different symbols. The table below describes all the
symbols that are used in making flowchart
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
20
• Flowchart to add two numbers?
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
21
• Flowchart with If Construct
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
22
• Flowchart with If Else
PROGRAMMING APPROACH FOR SOLVING A PROBLEM
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
23
• Flowchart with For Loop
Presented by: Muhammad Ehtisham Siddiqui (BSCS)
24

More Related Content

PPTX
Introduction to programming
PPTX
Theory of programming
PPT
Chapter 1 - An Introduction to Programming
PPTX
If else statement in c++
PPTX
Programming paradigm
PPSX
C++ Programming Language
PPTX
Data Types and Variables In C Programming
PDF
Computer Programming
Introduction to programming
Theory of programming
Chapter 1 - An Introduction to Programming
If else statement in c++
Programming paradigm
C++ Programming Language
Data Types and Variables In C Programming
Computer Programming

What's hot (20)

PPTX
Algorithms and Flowcharts
PPT
Basics of c++ Programming Language
PPTX
Control Statement programming
PPTX
Binary computing
PPT
History of c
PPSX
Conditional statement
PPS
Learn C
PPTX
Programming Fundamentals
PPTX
PPT
Programming
PPTX
Data types in c++
PPT
1. over view and history of c
PPT
Computer programming concepts
PPTX
Introduction of c programming
PPTX
Programming Fundamentals lecture 1
PPTX
Introduction to c++
PPT
Variables in C Programming
PPSX
Programming Fundamental Presentation
PPTX
Stucture of c program
Algorithms and Flowcharts
Basics of c++ Programming Language
Control Statement programming
Binary computing
History of c
Conditional statement
Learn C
Programming Fundamentals
Programming
Data types in c++
1. over view and history of c
Computer programming concepts
Introduction of c programming
Programming Fundamentals lecture 1
Introduction to c++
Variables in C Programming
Programming Fundamental Presentation
Stucture of c program
Ad

Similar to C programming Tutorial Session 1 (20)

PPTX
Introduction to c language
PPTX
Introduction to C Programming
PDF
Fundamentals of programming with C++
PPTX
Introduction to c++ with first program.pptx
DOC
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
PPTX
Master the Fundamentals of C Programming Language
DOC
C AND DATASTRUCTURES PREPARED BY M V B REDDY
PDF
C class basic programming 1 PPT mayanka (1).pdf
PDF
C-PROGRAMMING pdf text book notes vtu important
PPTX
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
PDF
Computer programming all chapters
PPTX
Introduction to programming c
PPTX
C session 1.pptx
DOCX
C Unit 1 notes PREPARED BY MVB REDDY
PPT
Introduction to Computer
PPTX
Bsc cs i pic u-1 introduction to c language
DOCX
Comso c++
DOC
Notes of c programming 1st unit BCA I SEM
PPTX
Programming in C
Introduction to c language
Introduction to C Programming
Fundamentals of programming with C++
Introduction to c++ with first program.pptx
C notes by m v b reddy(gitam)imp notes all units notes 5 unit order
Master the Fundamentals of C Programming Language
C AND DATASTRUCTURES PREPARED BY M V B REDDY
C class basic programming 1 PPT mayanka (1).pdf
C-PROGRAMMING pdf text book notes vtu important
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
Computer programming all chapters
Introduction to programming c
C session 1.pptx
C Unit 1 notes PREPARED BY MVB REDDY
Introduction to Computer
Bsc cs i pic u-1 introduction to c language
Comso c++
Notes of c programming 1st unit BCA I SEM
Programming in C
Ad

More from Muhammad Ehtisham Siddiqui (20)

PPTX
C programming Tutorial Session 4
PPTX
C programming Tutorial Session 4
PPTX
C programming Tutorial Session 3
PPTX
C programming Tutorial Session 2
PPTX
HTML5 Web storage
PPTX
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
PPTX
JavaScript Session 2
PPTX
JavaScript Session 3
PPTX
Javascript session 1
PPTX
Html audio video
PPTX
Html 5 geolocation api
PPTX
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
PPTX
Building Next Generation Websites Session6
PPTX
Building Next Generation Websites Session5
PPTX
Building Next Generation Websites Session4
PPTX
Office session14
C programming Tutorial Session 4
C programming Tutorial Session 4
C programming Tutorial Session 3
C programming Tutorial Session 2
HTML5 Web storage
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
JavaScript Session 2
JavaScript Session 3
Javascript session 1
Html audio video
Html 5 geolocation api
Buiding Next Generation Websites Session 8 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 7 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session 6 by Muhammad Ehtisham Siddiqui
Building Next Generation Websites by Muhammad Ehtisham Siddiqui
Building Next Generation Websites Session6
Building Next Generation Websites Session5
Building Next Generation Websites Session4
Office session14

Recently uploaded (20)

PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PPT
JAVA ppt tutorial basics to learn java programming
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Transform Your Business with a Software ERP System
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
AI in Product Development-omnex systems
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
JAVA ppt tutorial basics to learn java programming
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Transform Your Business with a Software ERP System
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
A REACT POMODORO TIMER WEB APPLICATION.pdf
Essential Infomation Tech presentation.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
AI in Product Development-omnex systems
ManageIQ - Sprint 268 Review - Slide Deck
Which alternative to Crystal Reports is best for small or large businesses.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
PTS Company Brochure 2025 (1).pdf.......
Online Work Permit System for Fast Permit Processing
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

C programming Tutorial Session 1

  • 2. OBJECTIVES • Differentiate between command, Program, and Software • Explain the beginning of C • Explain when and why C is used • Discuss the c program structure • Discuss Algorithm • Draw Flowcharts • List the symbol used in flowcharts Presented by: Muhammad Ehtisham Siddiqui (BSCS) 2
  • 3. COMMAND, PROGRAM AND SOFTWARE • In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. • A program is a set of instructions(commands) written in computer language to provide solution for a particular problem using computing devices is commonly referred as Program. • software is a collection of individual programs well packaged to run on a computer. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 3
  • 4. COMMAND, PROGRAM AND SOFTWARE Presented by: Muhammad Ehtisham Siddiqui (BSCS) 4 Software Program Program Command Command Command Command
  • 5. BEGINNING OF C • C programming language was invented by Dennis Ritchie at the Bell Laboratories in 1972. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 5
  • 6. APPLICATION AREAS OF C PROGRAMMING • C was initially used for Systems programming • A System programs forms a portion of the operating system of the computer or it support utilities • Operating systems, Interpreters, Editors, Assembly programs are usually called system programs • The UNIX operating system was developed using C • There are C compilers are available for almost all types of PC’s Presented by: Muhammad Ehtisham Siddiqui (BSCS) 6
  • 7. MIDDLE LEVEL LANGUAGE C is called middle-level language because it is actually bind the gap between a machine level language and high-level languages. User can use c language to do System Programming (for writing operating system) as well as Application Programming (for generate menu driven customer billing system ). Presented by: Muhammad Ehtisham Siddiqui (BSCS) 7
  • 8. STRUCTURED LANGUAGE • C is called a structured programming language because to solve a large problem • C allows compartmentalization of code and data • C programming language divides the problem into smaller modules called functions or procedures each of which handles a particular responsibility • The program which solves the entire problem is a collection of such functions For Ex: We have to develop a calculator . So we must have to divide programs into functions of Addition, Subtraction, Multiplication, Division etc. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 8
  • 9. ABOUT C PROGRAMMING (keywords) • There are 32 Keywords in C • Keywords are those words whose meaning is already defined by Compiler • Keywords cannot be used as a variable or function name Presented by: Muhammad Ehtisham Siddiqui (BSCS) 9
  • 10. C PROGRAMMING STRUCTURE [ main() ]  C programs are divided into units called functions  Identify the start of program  Every C program has a main ()  Main() is a keyword , we must not used it for any other variable  4 common ways of main declaration Presented by: Muhammad Ehtisham Siddiqui (BSCS) 10
  • 11. C PROGRAMMING STRUCTURE[Delimiters] • A delimiter is one or more characters that separates text strings • Common delimiters are commas (,), semicolon (;), quotes ( ", ' ), braces ({}), pipes (|), or slashes ( / ) • C programming Delimiters are as follows Presented by: Muhammad Ehtisham Siddiqui (BSCS) 11 Delimiter Symbol Use Colon : Useful for label Semicolon ; Terminates statements Parenthesis () Used in expression and function Square brackets [] Used for array declaration Curly braces {} Scope of statement Hash # Preprocessor directive Comma , variable separator #include<stdio.h> void main() { int a,b,c[10]; printf("hi"); }
  • 12. C PROGRAMMING STRUCTURE[Comment] • In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. • They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters. • In C Comment begin with /* and are terminated with */ Presented by: Muhammad Ehtisham Siddiqui (BSCS) 12
  • 13. THE C LIBRARY • All C compilers come with a standard library of functions • A function written by a programmer can be placed in the library and used when required • Some compilers allow functions to be added in the standard library • Some compilers require a separate library to be created • C Standard library functions or simply C Library functions are inbuilt functions in C programming. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 13
  • 14. COMPILING AND RUNNING A PROGRAM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 14
  • 15. PROGRAMMING APPROACH FOR SOLVING A PROBLEM What is algorithm ? Algorithm is a set of instruction performed by programmer to solve a problems Presented by: Muhammad Ehtisham Siddiqui (BSCS) 15
  • 16. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 16 3. Process the information 1. Understand the problem clearly 4. Arrive the solution 2. Understand the problem clearly To solve problems
  • 17. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 17 • Pseudocode is a simple way of writing programming code in English. • Pseudocode is not actual programming language. • For Example: 1. Start Program 2. Enter two numbers, A, B 3. Add the numbers together 4. Print Sum 5. End Program Each pseudocode starts with a BEGIN/START To show some value , the word DISPLAY/PRINT is used The pseudocode finishes with an END
  • 18. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 18 • What is Flowchart ? Flowchart is a diagrammatic representation of an algorithm. Flowchart are very helpful in writing program and explaining program to others.
  • 19. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 19 • Flowchart Symbol Different symbols are used for different states in flowchart, For example: Input / Output and decision making has different symbols. The table below describes all the symbols that are used in making flowchart
  • 20. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 20 • Flowchart to add two numbers?
  • 21. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 21 • Flowchart with If Construct
  • 22. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 22 • Flowchart with If Else
  • 23. PROGRAMMING APPROACH FOR SOLVING A PROBLEM Presented by: Muhammad Ehtisham Siddiqui (BSCS) 23 • Flowchart with For Loop
  • 24. Presented by: Muhammad Ehtisham Siddiqui (BSCS) 24