SlideShare a Scribd company logo
Basics of ‘C’
By Gaikwad Varsha P.
Asst. Prof. Information Technology Dept.
Govt. College of Engg. Aurangabad
The Character set of ‘C’
C language consist of some characters set, numbers and
some special symbols. The character set of C consist of all
the alphabets of English language. C consist of
Alphabets a to z, A to Z
Numeric 0,1 to 9
Special Symbols {,},[,],?,+,-,*,/,%,!,;,and more
The words formed from the character set are building
blocks of C and are sometimes known as tokens. These
tokens represent the individual entity of language. The
following different types of token are used in C
1) Identifiers 2)Keywords 3)Constants
4) Operators 5)Punctuation Symbols
Keywords
• Keywords are nothing but
system defined identifiers.
• Keywords are reserved
words of the language.
• They have specific meaning
in the language and cannot
be used by the programmer
as variable or constant
names
• C is case senitive, it means
these must be used as it is
• 32 Keywords in C
Programming
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while
Variables
• A variable is nothing but a name given to a storage area that our programs
can manipulate. Each variable in C has a specific type, which determines
the size and layout of the variable's memory; the range of values that can
be stored within that memory; and the set of operations that can be applied
to the variable.
• The name of a variable can be composed of letters, digits, and the
underscore character. It must begin with either a letter or an underscore.
Upper and lowercase letters are distinct because C is case-sensitive. There
are following basic variable types −
Type Description
• char Typically a single octet(one byte). This is an integer
type.
• int The most natural size of integer for the machine.
• float A single-precision floating point value.
• double A double-precision floating point value.
• void Represents the absence of type.
Constants
• A constant is a value or an identifier whose value cannot be
altered in a program. For example: 1, 2.5,
• As mentioned, an identifier also can be defined as a constant.
eg. const double PI = 3.14
• Here, PI is a constant. Basically what it means is that, PI and
3.14 is same for this program.
Integer constants
• A integer constant is a numeric constant (associated with
number) without any fractional or exponential part. There are
three types of integer constants in C programming:
• decimal constant(base 10)
• octal constant(base 8)
• hexadecimal constant(base 16)
Constants
Floating-point constants
• A floating point constant is a numeric constant that has
either a fractional form or an exponent form. For
example: 2.0,0.0000234,-0.22E-5
Character constants
• A character constant is a constant which uses single
quotation around characters. For example: 'a', 'l', 'm', 'F'
String constants
• String constants are the constants which are enclosed in
a pair of double-quote marks. For example:
"good" ,"x","Earth is roundn"
Escape Sequences
Sometimes, it is necessary to use characters which cannot be typed or has
special meaning in C programming. For example: newline(enter), tab,
question mark etc. In order to use these characters, escape sequence is
used.
• For example: n is used for newline. The backslash (  ) causes "escape"
from the normal way the characters are interpreted by the compiler.Escape
Sequences Character
• b Backspace
• f Form feed
• n Newline
• r Return
• t Horizontal tab
• v Vertical tab
•  Backslash
• ' Single quotation mark
• " Double quotation mark
• ? Question mark
• 0 Null character
Operators in C:An operator is a symbol which operates on a
value or a variable. For example: + is an operator to perform addition.
C programming has wide range of operators to perform
various operations. For better understanding of
operators, these operators can be classified as:
• Arithmetic Operators
• Increment and Decrement Operators
• Assignment Operators
• Relational Operators
• Logical Operators
• Conditional Operators
• Bitwise Operators
• Special Operators
Arithmetic Operator
• Operator Meaning of Operator
• + addition or unary plus
• - subtraction or unary minus
• * multiplication
• / division
• % remainder after
division( modulo division)
Increment and Decrement Operators
1. C programming has two operators increment
++ and decrement -- to change the value of an
operand (constant or variable) by 1.
2. Increment ++ increases the value by 1
whereas decrement -- decreases the value by 1.
3. These two operators are unary operators,
meaning they only operate on a single operand.
eg. int a=10, b=100
++a = 11
--b = 99

More Related Content

PPT
Basics of C.ppt C PROGRAMMING AND DATA STRUCT
PPT
Basics of C programming powerpoint p.ppt
PPT
Basics of C.pptArray.pptxArray.pptxArray.pptx
PPT
Basics of C.ppt VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
PPT
Basics of C programming concept and type
PPT
C programming and problem solving for real time solution
PPT
Programming in C-To study basics of C programming Language.
PPT
Introduction to Programming Concepts Algorithm Flowchart Introduction to C...
Basics of C.ppt C PROGRAMMING AND DATA STRUCT
Basics of C programming powerpoint p.ppt
Basics of C.pptArray.pptxArray.pptxArray.pptx
Basics of C.ppt VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Basics of C programming concept and type
C programming and problem solving for real time solution
Programming in C-To study basics of C programming Language.
Introduction to Programming Concepts Algorithm Flowchart Introduction to C...

Similar to Basics of C Programming Language Introduction.pptx (20)

PPT
Basics of C programming power point presentation
PPT
Basics of C.ppt,...................................
PPT
Basics of C (2).ppt bbbbbbbbbbbbbbbbbbbbb
PPT
Basics of C gives about C programing and its applications
PPT
Basics of C.ppt
PPT
Basics of C (1).ppt
PPT
Basics of C (1).ppt
PPT
C programming basic pdf.ppt
PPT
Basics of C.ppt
PPT
Basiscs of c++ include variable, special characters
PPT
Basics of C.ppt
PPT
Basics of C--C Basics------------------.ppt
PPT
Basics of C.ppt
PPT
Basics of C.ppt
PPT
Funa-C.ppt
PPT
Basics of C.ppt
PPT
Basics of C.ppt
PPT
Basics of C.ppt
PPT
Basics of C.ppt
PPT
Basics of c
Basics of C programming power point presentation
Basics of C.ppt,...................................
Basics of C (2).ppt bbbbbbbbbbbbbbbbbbbbb
Basics of C gives about C programing and its applications
Basics of C.ppt
Basics of C (1).ppt
Basics of C (1).ppt
C programming basic pdf.ppt
Basics of C.ppt
Basiscs of c++ include variable, special characters
Basics of C.ppt
Basics of C--C Basics------------------.ppt
Basics of C.ppt
Basics of C.ppt
Funa-C.ppt
Basics of C.ppt
Basics of C.ppt
Basics of C.ppt
Basics of C.ppt
Basics of c
Ad

Recently uploaded (20)

PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
composite construction of structures.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Geodesy 1.pptx...............................................
PPT
introduction to datamining and warehousing
PPT
Mechanical Engineering MATERIALS Selection
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Construction Project Organization Group 2.pptx
PPTX
Current and future trends in Computer Vision.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
PPT on Performance Review to get promotions
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
composite construction of structures.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Geodesy 1.pptx...............................................
introduction to datamining and warehousing
Mechanical Engineering MATERIALS Selection
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Construction Project Organization Group 2.pptx
Current and future trends in Computer Vision.pptx
bas. eng. economics group 4 presentation 1.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Operating System & Kernel Study Guide-1 - converted.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPT on Performance Review to get promotions
Internet of Things (IOT) - A guide to understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Ad

Basics of C Programming Language Introduction.pptx

  • 1. Basics of ‘C’ By Gaikwad Varsha P. Asst. Prof. Information Technology Dept. Govt. College of Engg. Aurangabad
  • 2. The Character set of ‘C’ C language consist of some characters set, numbers and some special symbols. The character set of C consist of all the alphabets of English language. C consist of Alphabets a to z, A to Z Numeric 0,1 to 9 Special Symbols {,},[,],?,+,-,*,/,%,!,;,and more The words formed from the character set are building blocks of C and are sometimes known as tokens. These tokens represent the individual entity of language. The following different types of token are used in C 1) Identifiers 2)Keywords 3)Constants 4) Operators 5)Punctuation Symbols
  • 3. Keywords • Keywords are nothing but system defined identifiers. • Keywords are reserved words of the language. • They have specific meaning in the language and cannot be used by the programmer as variable or constant names • C is case senitive, it means these must be used as it is • 32 Keywords in C Programming auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while
  • 4. Variables • A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. • The name of a variable can be composed of letters, digits, and the underscore character. It must begin with either a letter or an underscore. Upper and lowercase letters are distinct because C is case-sensitive. There are following basic variable types − Type Description • char Typically a single octet(one byte). This is an integer type. • int The most natural size of integer for the machine. • float A single-precision floating point value. • double A double-precision floating point value. • void Represents the absence of type.
  • 5. Constants • A constant is a value or an identifier whose value cannot be altered in a program. For example: 1, 2.5, • As mentioned, an identifier also can be defined as a constant. eg. const double PI = 3.14 • Here, PI is a constant. Basically what it means is that, PI and 3.14 is same for this program. Integer constants • A integer constant is a numeric constant (associated with number) without any fractional or exponential part. There are three types of integer constants in C programming: • decimal constant(base 10) • octal constant(base 8) • hexadecimal constant(base 16)
  • 6. Constants Floating-point constants • A floating point constant is a numeric constant that has either a fractional form or an exponent form. For example: 2.0,0.0000234,-0.22E-5 Character constants • A character constant is a constant which uses single quotation around characters. For example: 'a', 'l', 'm', 'F' String constants • String constants are the constants which are enclosed in a pair of double-quote marks. For example: "good" ,"x","Earth is roundn"
  • 7. Escape Sequences Sometimes, it is necessary to use characters which cannot be typed or has special meaning in C programming. For example: newline(enter), tab, question mark etc. In order to use these characters, escape sequence is used. • For example: n is used for newline. The backslash ( ) causes "escape" from the normal way the characters are interpreted by the compiler.Escape Sequences Character • b Backspace • f Form feed • n Newline • r Return • t Horizontal tab • v Vertical tab • Backslash • ' Single quotation mark • " Double quotation mark • ? Question mark • 0 Null character
  • 8. Operators in C:An operator is a symbol which operates on a value or a variable. For example: + is an operator to perform addition. C programming has wide range of operators to perform various operations. For better understanding of operators, these operators can be classified as: • Arithmetic Operators • Increment and Decrement Operators • Assignment Operators • Relational Operators • Logical Operators • Conditional Operators • Bitwise Operators • Special Operators
  • 9. Arithmetic Operator • Operator Meaning of Operator • + addition or unary plus • - subtraction or unary minus • * multiplication • / division • % remainder after division( modulo division)
  • 10. Increment and Decrement Operators 1. C programming has two operators increment ++ and decrement -- to change the value of an operand (constant or variable) by 1. 2. Increment ++ increases the value by 1 whereas decrement -- decreases the value by 1. 3. These two operators are unary operators, meaning they only operate on a single operand. eg. int a=10, b=100 ++a = 11 --b = 99