SlideShare a Scribd company logo
Basics of ‘C’
By :Lalit Raghav.
Prof. Anupama Tiwari.
GURUGRAM UNIVERSITY
General Aspect of ‘C’
C was originally developed in the 1970s, by Dennis Ritchie
at Bell Telephone Laboratories, Inc.
C is a High level , general –purpose structured
programming language. Instructions of C consists of terms
that are very closely same to algebraic expressions,
consisting of certain English keywords such as if, else,
for ,do and while
C contains certain additional features that allows it to be
used at a lower level , acting as bridge between machine
language and the high level languages.
This allows C to be used for system programming as well
as for applications programming
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
LOGICAL Operator (&&,||,!)
• Operator Meaning of Operator
• && Logical AND
• || Logical OR
• ! Logical NOT
Logical AND
LOGICAL AND
2 CASE :
Logical OR :
Logical Not
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
C Assignment Operators
• An assignment operator is used for assigning a
value to a variable. The most common
assignment operator is =
• Operator Example Same as
• = a = b a = b
• += a += b a = a+b
• -= a -= b a = a-b
• *= a *= b a = a*b
• /= a /= b a = a/b
• %= a %= b a = a%b
C Relational Operators :
• A relational operator checks the relationship between
two operands. If the relation is true, it returns 1; if the
relation is false, it returns value 0.
• Relational operators are used in decision making and
loops.
Operator Meaning of Operator Example
• == Equal to 5 == 3 returns 0
• > Greater than 5 > 3 returns 1
• < Less than 5 < 3 returns 0
• != Not equal to 5 != 3 returns 1
• >= Greater than or equal to 5 >= 3 returns 1
• <= Less than or equal to 5 <= 3 return 0
Basics of C.ppt this is basic information about the c programming language

More Related Content

PDF
Types of Operators in C
PPTX
C Operators and Control Structures.pptx
PPTX
3. C_OperatorsExpressions on c languyage.pptx
PDF
C Operators and Control Structures.pdf
PPTX
introduction to c programming and C History.pptx
PPTX
Operators-computer programming and utilzation
PPTX
C operators
PPTX
PROGRAMMING IN C - Operators.pptx
Types of Operators in C
C Operators and Control Structures.pptx
3. C_OperatorsExpressions on c languyage.pptx
C Operators and Control Structures.pdf
introduction to c programming and C History.pptx
Operators-computer programming and utilzation
C operators
PROGRAMMING IN C - Operators.pptx

Similar to Basics of C.ppt this is basic information about the c programming language (20)

PDF
Introduction to programming c and data-structures
PDF
Introduction to programming c and data structures
PPTX
c programming language.pptx
PDF
Unit ii chapter 1 operator and expressions in c
PPTX
C language basics
PPTX
operators.pptx
PPTX
COM1407: C Operators
PPTX
Fundamentals of computers - C Programming
PPTX
Operators in C programming language.pptx
PPTX
TOKENS-grp-4[1].pptx PLLEASE DOWNLOAD IT
PPT
C program
PPTX
Variables, Data Types, Operator & Expression in c in detail
PPTX
BCP_u2.pptxBCP_u2.pptxBCP_u2.pptxBCP_u2.pptx
PPTX
PDF
ICP - Lecture 5
PPTX
Operators1.pptx
PDF
Module 2_PPT_P1 POP Notes module 2 fdfd.pdf
PPTX
C Programming Introduction
PPT
Basics of C
PPTX
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
Introduction to programming c and data-structures
Introduction to programming c and data structures
c programming language.pptx
Unit ii chapter 1 operator and expressions in c
C language basics
operators.pptx
COM1407: C Operators
Fundamentals of computers - C Programming
Operators in C programming language.pptx
TOKENS-grp-4[1].pptx PLLEASE DOWNLOAD IT
C program
Variables, Data Types, Operator & Expression in c in detail
BCP_u2.pptxBCP_u2.pptxBCP_u2.pptxBCP_u2.pptx
ICP - Lecture 5
Operators1.pptx
Module 2_PPT_P1 POP Notes module 2 fdfd.pdf
C Programming Introduction
Basics of C
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
Ad

Recently uploaded (20)

PDF
Understanding Forklifts - TECH EHS Solution
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Transform Your Business with a Software ERP System
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
AI in Product Development-omnex systems
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
System and Network Administraation Chapter 3
PPTX
history of c programming in notes for students .pptx
Understanding Forklifts - TECH EHS Solution
CHAPTER 2 - PM Management and IT Context
Transform Your Business with a Software ERP System
L1 - Introduction to python Backend.pptx
Reimagine Home Health with the Power of Agentic AI​
Navsoft: AI-Powered Business Solutions & Custom Software Development
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Design an Analysis of Algorithms II-SECS-1021-03
medical staffing services at VALiNTRY
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
AI in Product Development-omnex systems
How Creative Agencies Leverage Project Management Software.pdf
Operating system designcfffgfgggggggvggggggggg
System and Network Administraation Chapter 3
history of c programming in notes for students .pptx
Ad

Basics of C.ppt this is basic information about the c programming language

  • 1. Basics of ‘C’ By :Lalit Raghav. Prof. Anupama Tiwari. GURUGRAM UNIVERSITY
  • 2. General Aspect of ‘C’ C was originally developed in the 1970s, by Dennis Ritchie at Bell Telephone Laboratories, Inc. C is a High level , general –purpose structured programming language. Instructions of C consists of terms that are very closely same to algebraic expressions, consisting of certain English keywords such as if, else, for ,do and while C contains certain additional features that allows it to be used at a lower level , acting as bridge between machine language and the high level languages. This allows C to be used for system programming as well as for applications programming
  • 3. 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
  • 4. LOGICAL Operator (&&,||,!) • Operator Meaning of Operator • && Logical AND • || Logical OR • ! Logical NOT
  • 9. 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
  • 10. C Assignment Operators • An assignment operator is used for assigning a value to a variable. The most common assignment operator is = • Operator Example Same as • = a = b a = b • += a += b a = a+b • -= a -= b a = a-b • *= a *= b a = a*b • /= a /= b a = a/b • %= a %= b a = a%b
  • 11. C Relational Operators : • A relational operator checks the relationship between two operands. If the relation is true, it returns 1; if the relation is false, it returns value 0. • Relational operators are used in decision making and loops. Operator Meaning of Operator Example • == Equal to 5 == 3 returns 0 • > Greater than 5 > 3 returns 1 • < Less than 5 < 3 returns 0 • != Not equal to 5 != 3 returns 1 • >= Greater than or equal to 5 >= 3 returns 1 • <= Less than or equal to 5 <= 3 return 0