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

PPT
Chapter 1 - An Introduction to Programming
PPT
Part 2 desktop and start menu
PPT
Language translator
PPTX
Introduction to Keyboarding | Alex Noudelman
PPT
Computer operations 7
PPT
Java Tutorial
PPTX
The different components of a computer system
PPTX
Fundamentals of operating system
Chapter 1 - An Introduction to Programming
Part 2 desktop and start menu
Language translator
Introduction to Keyboarding | Alex Noudelman
Computer operations 7
Java Tutorial
The different components of a computer system
Fundamentals of operating system

What's hot (20)

PPTX
Computer software
PPTX
Algorithm and flowchart.pptx
PPTX
The elements of a computer system
PPTX
BASIC PARTS OF COMPUTER FOR DEMO TEACHING
PPTX
Lesson 5 computer software
PPTX
Ict lecture 1 An introduction to information and Communication technology and...
PPTX
Presentation Introduction to Windows
PPTX
Parts of a computer
PPTX
flowchart & algorithms
PPTX
381091947 introduction-computer-systems-servicing-nc-ii
PDF
Data processing for SS 1-3
PPT
Intro to Computers
PDF
Principles of-programming-languages-lecture-notes-
PPT
1 01 Computer Components
PPTX
Basic Computer Operation
PPTX
Computer Fundamental
PPSX
InformĂĄtica conceitos bĂĄsicos
PDF
Computer fundamental
PPTX
computer hardware
PPT
Introduction to computer
Computer software
Algorithm and flowchart.pptx
The elements of a computer system
BASIC PARTS OF COMPUTER FOR DEMO TEACHING
Lesson 5 computer software
Ict lecture 1 An introduction to information and Communication technology and...
Presentation Introduction to Windows
Parts of a computer
flowchart & algorithms
381091947 introduction-computer-systems-servicing-nc-ii
Data processing for SS 1-3
Intro to Computers
Principles of-programming-languages-lecture-notes-
1 01 Computer Components
Basic Computer Operation
Computer Fundamental
InformĂĄtica conceitos bĂĄsicos
Computer fundamental
computer hardware
Introduction to computer
Ad

Similar to C programming Tutorial Session 1 (20)

PPTX
1.0 Introduction to C programming for all first year courses.pptx
PPT
Introduction to C Programming - I
DOC
Notes of c programming 1st unit BCA I SEM
DOC
C AND DATASTRUCTURES PREPARED BY M V B REDDY
PDF
C-PROGRAMMING pdf text book notes vtu important
PPTX
Full Basic Programming in c material ppt
PPTX
introduction to c language
PPTX
Mca i pic u-1 introduction to c language
PPTX
Unit 1.pptx
PDF
C programme presentation
PPTX
Btech i pic u-1 introduction to c language
PPTX
CSE 1201: Structured Programming Language
PPT
Lecture 01 2017
PDF
1. Basics of C programming-123456674.pdf
PDF
Introduction to C programming
PDF
Programming Fundamentals and basic knowledge
PPTX
Diploma ii cfpc u-1 introduction to c language
PPTX
Bsc cs i pic u-1 introduction to c language
PPTX
Computer Programming In C.pptx
PDF
TCS-NQT-Coding-Questions-@-Recruitmentindia.in_.pdf
1.0 Introduction to C programming for all first year courses.pptx
Introduction to C Programming - I
Notes of c programming 1st unit BCA I SEM
C AND DATASTRUCTURES PREPARED BY M V B REDDY
C-PROGRAMMING pdf text book notes vtu important
Full Basic Programming in c material ppt
introduction to c language
Mca i pic u-1 introduction to c language
Unit 1.pptx
C programme presentation
Btech i pic u-1 introduction to c language
CSE 1201: Structured Programming Language
Lecture 01 2017
1. Basics of C programming-123456674.pdf
Introduction to C programming
Programming Fundamentals and basic knowledge
Diploma ii cfpc u-1 introduction to c language
Bsc cs i pic u-1 introduction to c language
Computer Programming In C.pptx
TCS-NQT-Coding-Questions-@-Recruitmentindia.in_.pdf
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
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Understanding Forklifts - TECH EHS Solution
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
AI in Product Development-omnex systems
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
history of c programming in notes for students .pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Essential Infomation Tech presentation.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Wondershare Filmora 15 Crack With Activation Key [2025
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
Design an Analysis of Algorithms II-SECS-1021-03
Reimagine Home Health with the Power of Agentic AI​
Navsoft: AI-Powered Business Solutions & Custom Software Development
Understanding Forklifts - TECH EHS Solution
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
AI in Product Development-omnex systems
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
VVF-Customer-Presentation2025-Ver1.9.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
history of c programming in notes for students .pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Essential Infomation Tech presentation.pptx
Softaken Excel to vCard Converter Software.pdf
Odoo POS Development Services by CandidRoot Solutions
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises

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