SlideShare a Scribd company logo
1
Objectives
❏ To understand the structure of a C-language program.
❏ To write your first C program.
❏ To introduce the include preprocessor command.
❏ To be able to create good identifiers for objects in a program.
❏ To be able to list, describe, and use the C basic data types.
❏ To be able to create and use variables and constants.
❏ To understand input and output concepts.
❏ To be able to use simple input and output statements.
Introduction to the C Language
2
Background
C is a structured programming language. It is
considered a high-level language because it allows the
programmer to concentrate on the problem at hand
and not worry about the machine that the program
will be using. That is another reason why it is used by
software developers whose applications have to run on
many different hardware platforms.
3
C Programs
It's time to write your first C program.
Structure of a C Program
Your First C Program
Comments
The Greeting Program
Topics discussed in this section:
4
Structure of a C Program
5
The Greeting Program
6
The Greeting Program
7
Examples of Block Comments
8
Examples of Line Comments
9
Identifiers
One feature present in all computer languages is the
identifier. Identifiers allow us to name data and other
objects in the program. Each identified object in the
computer is stored at a unique address.
10
Rules for Identifiers
11
C is a case-sensitive language.
Note
12
Examples of Valid and Invalid Names
13
Data Types
14
Character Types
15
Integer Types
16
sizeof (short) ≤ sizeof (int) ≤ sizeof (long) ≤ sizeof (long long)
Note
17
Typical Integer Sizes and Values for Signed Integers
18
Floating-point Types
19
sizeof (float) ≤ sizeof (double) ≤ sizeof (long double)
Note
20
Type Summary
21
Variables
Variables are named memory locations that have a type,
such as integer or character, which is inherited from
their type. The type determines the values that a variable
may contain and the operations that may be used with
its values.
Variable Declaration
Variable Initialization
Topics discussed in this section:
22
Variables
23
Examples of Variable Declarations and Definitions
24
Variable Initialization
‘B’
25
Constants
Constants are data values that cannot be changed
during the execution of a program. Like variables,
constants have a type. In this section, we discuss
Boolean, character, integer, real, complex, and string
constants.
Constant Representation
Coding Constants
Topics discussed in this section:
26
Symbolic Names for Control Characters
27
Examples of Integer Constants
28
Examples of Real Constants

More Related Content

PPT
1.Introduction_to_c_programming lan.ppt
PPT
SHIVAM.ppt training report presentations
PPT
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
PDF
C programming language tutorial for beginers.pdf
PPT
Chap-02-1.ppt
PPT
Chap-02-1.ppt
PPT
Chap-02-1.ppt
PPT
Chap-02-1.ppt
1.Introduction_to_c_programming lan.ppt
SHIVAM.ppt training report presentations
CODING-DAY-2-INTRODUCTION TO C PROGRAMMING.ppt
C programming language tutorial for beginers.pdf
Chap-02-1.ppt
Chap-02-1.ppt
Chap-02-1.ppt
Chap-02-1.ppt

Similar to Introduction_to_c_programming.ppt for software developing students (20)

PPT
Chap-02-1.ppt
PPT
Chap 02-1
PPTX
C programming-1.pptx
PPT
Chap-02-01.ppt
PDF
Introduction to C programming
PPTX
Aniket tore
PPTX
unit2.pptx
PPT
the programming Structure of c concept.ppt
PPTX
Lec 02 Introduction to C Programming.pptx
PPTX
Fundamental programming Nota Topic 2.pptx
PPSX
Programming in C [Module One]
DOCX
Let's us c language (sabeel Bugti)
PPTX
LESSON1-C_programming (1).GRADE 8 LESSONpptx
PPT
Introduction to C Programming - I
PPT
C Programming Intro.ppt
PDF
67404923-C-Programming-Tutorials-Doc.pdf
PPTX
C programming
DOCX
C tutorials
PPTX
Introduction to c programming
Chap-02-1.ppt
Chap 02-1
C programming-1.pptx
Chap-02-01.ppt
Introduction to C programming
Aniket tore
unit2.pptx
the programming Structure of c concept.ppt
Lec 02 Introduction to C Programming.pptx
Fundamental programming Nota Topic 2.pptx
Programming in C [Module One]
Let's us c language (sabeel Bugti)
LESSON1-C_programming (1).GRADE 8 LESSONpptx
Introduction to C Programming - I
C Programming Intro.ppt
67404923-C-Programming-Tutorials-Doc.pdf
C programming
C tutorials
Introduction to c programming
Ad

More from Asfiya14 (9)

PDF
myseminarppt-1-1-210222133511.pdf of ipr
PPTX
IPR Presentation.ppt on publication of patents
PDF
10..Freeze fracture, etching of techniques
PDF
Synthesis of secretory Cell wall is a part of cell structure that covers it f...
PDF
Cell wall is a part of cell structure that covers it from outside
PDF
Cell wall is a part of cell structure that covers it from outside
PDF
Cell cycle is a part of a unit of cell biology in life sciences stream
PDF
Zygomycota is a part of Botany and class of plants
PPTX
ENGLISH PRESENTATION for report writing in assignment
myseminarppt-1-1-210222133511.pdf of ipr
IPR Presentation.ppt on publication of patents
10..Freeze fracture, etching of techniques
Synthesis of secretory Cell wall is a part of cell structure that covers it f...
Cell wall is a part of cell structure that covers it from outside
Cell wall is a part of cell structure that covers it from outside
Cell cycle is a part of a unit of cell biology in life sciences stream
Zygomycota is a part of Botany and class of plants
ENGLISH PRESENTATION for report writing in assignment
Ad

Recently uploaded (20)

PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
L1 - Introduction to python Backend.pptx
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
PDF
5 Lead Qualification Frameworks Every Sales Team Should Use
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPT
JAVA ppt tutorial basics to learn java programming
PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
2025 Textile ERP Trends: SAP, Odoo & Oracle
L1 - Introduction to python Backend.pptx
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Essential Infomation Tech presentation.pptx
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Online Work Permit System for Fast Permit Processing
Safe Confined Space Entry Monitoring_ Singapore Experts.pptx
5 Lead Qualification Frameworks Every Sales Team Should Use
How to Choose the Right IT Partner for Your Business in Malaysia
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
JAVA ppt tutorial basics to learn java programming
Materi_Pemrograman_Komputer-Looping.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
A REACT POMODORO TIMER WEB APPLICATION.pdf
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution

Introduction_to_c_programming.ppt for software developing students

Editor's Notes

  • #3: Developed early 1970’s
  • #15: wchar_t is a wide character:  The increased datatype size allows for the use of larger coded character sets. Width is compiler specific (not portable).