SlideShare a Scribd company logo
Ms.K.Banupriya
Assistant Professor
Department of Information Technology
Bon Secours College for Women, Thanjavur.
C is the programming language
developed by dennis M . Ritchie at Bell
lab in USA.
‘c’ is a middle level language .
UNIX operating system was written in
‘c’ language.
‘c’ language is used as most common
platform for developing system
programs.
 It is one of the most popular computer
language today because it is a
structural,high-level machine
independent language.
It allows the developes to develop
programs without worrying about the
hardware about the platform where
they will be implemented.
 Programs written in c are efficient and fast.
 There are only 32 keywords in ANSIC and
its strength lies in this built-in-function.
 C is highly portable.
 C language is well suited for structured
programming .
 Another important feature of c is its ability to
extend itself.
#include<stdio.h>
#include<math.h>
Void main()
{
Clrscr()
int a,b,c,
printf(“Enter the value for a&b”);
Scanf(%d%d”,&a&b);
C=a+b;
Printf(“The addition result is”
getch();
}
 c operator can be classified of a number
categries.These are
1.arithmetic operator
2.Relation operator
3. Logical operator
4. assingment operator
5.increment &decrement opertor
6.condition operator
7. Bitwise operator
8. special operator
 arithmetic operator is used to
performing mathematical operations
such as addition subtraction
multiplication , division ,modules,.
operator meaning
+ Addition
_ Subtraction
* Multiplication
/ Division
% Module
#include<stdio.h>
#inlude<conio.h>
Void main( )
{
int a,b;
Clrscr( );
Printf(“Enter the two value:n”);
Scanf(“%d%d”,&a&b);
Printf(“addition:n”,a+b);
Printf(“subtraction:n”,a-b);
Printf(“multiplicationm:n”,a*b);
Printf(“division:n”,a/b);
Printf(“module division:/n”,a%b);
getch();
}
 a relational operator checks the relational between two
operands . If the relation is true ,it returns 1; if the relation
is false , it returns value 0.relational operator are used in
decision making and loops
operator meaning
< Is less than
<= Is less than or equal to
> Greater than
>= Is greater than or equal to
== Is equal to
!= Is not equal to
#include<stdio.h>
#include<conio.h>
Void main( )
{
int a,b;
clrscr( );
Printf(Enter the two value:n”);
Scanf(“%d%d,&a&b);
If(a>b)
{
Printf(“A is the greater than:n”)
}
Else
{
Printf(“A is the greater than :/n”)
}
Getch( )
}
 We use logical operator to perform
various logical operations on any
set of given expressions .
logical operator meaning
&& Logical AND
|| Logical OR
! Logical NOT
#include<stdio.h>
#include<conio.h>
Void main( )
{
int a=40,b=20,c=30,D=40;
clrscr( );
If(a>b&&c<d)
Printf(A is greater than B OR D is greater than C”);
Else
Printf(logical OR function does not satisfied ”)
Getch( )
}
 Assignment operator are used to assigning value to a
variable.
 Left side operand of the assignment operator is a variable
and right side operand of the assignment operator is a
value
compound
assignment
equivalent
assignment
A>>=B A=A>>B
A&=58 A=A&58
A|=B A=A|B
A^=B A=A^B
A/=(B+C) A=A/(B+C)
A%=(X%10) A=A%(X%10)
PROGRAM:
#include <stdio.h>
#include<conio.h>
Void main( )
{
Int a=10,b=20
Clrscr( );
Printf(“A%d”,a);
Printf(“n B%d”,b)
a=a+b
Printf(“nA%d”,a);
Getch( )
}
 ++ and - - operators are called increment and decrement
operators.
 they are unary operator needing only one operand.hence
++ as well - - operand can appear before or after the
operand with same effect.
compound
assignment
equivalent
assignment
A>>=B A=A>>B
A&=58 A=A&58
A|=B A=A|B
A^=B A=A^B
A/=(B+C) A=A/(B+C)
A%=(X%10) A=A%(X%10)
PROGRAM:
#include<stdio.h>
#include<conio.h>
Void main ( )
{
Int a=10,
Clrscr( )
Printf(“A++ is ,%d”,a++);
Printf(“n A is ,%d”, a);
Getch( );
}
 conditional operator is a single programming
statement ,while the if-else statement is a
programming block in which statements come
under the pranthesis.
exp 1,exp 2, exp 3
 This operator is used as a pointer to a
variable .
comma operator
size of the operator
 bitwise operator are character that represent
action(bitwise operation) to be performed on single bits .
 they operate at the binary level and perform operation on
bit patterns that involve the manipulation of individual
bits .
operator meaning
& bitwise AND
| Bitwise OR
^ Bitwise exclisive OR
<< Left shift
>> Right shift
~ One’s complement
PROGRAM:
#include<stdio.h>
#<inlude<conio.h>
Void main( )
{
Int test=1;
Int number;
Printf(“input a numbern”)
Scanf(“%d”,& number);
While(number!=-1)
{
If(number&test)
Printf(“Number is odd n”);
Else
Printf(“Number is even n”);
Printf(“input a numbern”);
Scanf(“%d”,&number);
}
}

More Related Content

Similar to c programming language.pptx

C program report tips
C program report tipsC program report tips
C program report tips
Harry Pott
 
In C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docxIn C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docx
tristans3
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structures
Pradipta Mishra
 
C-PPT.pdf
C-PPT.pdfC-PPT.pdf
C-PPT.pdf
chaithracs3
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
Ashishchinu
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures
Pradipta Mishra
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
Kaushal Patel
 
presentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptxpresentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptx
KrishanPalSingh39
 
Sample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.SivakumarSample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.Sivakumar
Sivakumar R D .
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
MKalpanaDevi
 
Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01
Getachew Ganfur
 
complete data structure
complete data structurecomplete data structure
complete data structure
Anuj Arora
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
vampugani
 
C quiz
C quizC quiz
C quiz
hardeep01
 
C language
C language C language
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
Indira Gnadhi National Open University (IGNOU)
 
C language
C languageC language
C language
Yasir Khan
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
Mehul Desai
 
C Language Lecture 16
C Language Lecture 16C Language Lecture 16
C Language Lecture 16
Shahzaib Ajmal
 
Numerical analysis
Numerical analysisNumerical analysis
Numerical analysis
Vishal Singh
 

Similar to c programming language.pptx (20)

C program report tips
C program report tipsC program report tips
C program report tips
 
In C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docxIn C Programming create a program that converts a number from decimal.docx
In C Programming create a program that converts a number from decimal.docx
 
Introduction to programming c and data structures
Introduction to programming c and data structuresIntroduction to programming c and data structures
Introduction to programming c and data structures
 
C-PPT.pdf
C-PPT.pdfC-PPT.pdf
C-PPT.pdf
 
'C' language notes (a.p)
'C' language notes (a.p)'C' language notes (a.p)
'C' language notes (a.p)
 
Introduction to programming c and data-structures
Introduction to programming c and data-structures Introduction to programming c and data-structures
Introduction to programming c and data-structures
 
Operators-computer programming and utilzation
Operators-computer programming and utilzationOperators-computer programming and utilzation
Operators-computer programming and utilzation
 
presentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptxpresentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptx
 
Sample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.SivakumarSample for Simple C Program - R.D.Sivakumar
Sample for Simple C Program - R.D.Sivakumar
 
Functions and pointers_unit_4
Functions and pointers_unit_4Functions and pointers_unit_4
Functions and pointers_unit_4
 
Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01
 
complete data structure
complete data structurecomplete data structure
complete data structure
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 
C quiz
C quizC quiz
C quiz
 
C language
C language C language
C language
 
Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16Mcs 011 solved assignment 2015-16
Mcs 011 solved assignment 2015-16
 
C language
C languageC language
C language
 
Unit-IV.pptx
Unit-IV.pptxUnit-IV.pptx
Unit-IV.pptx
 
C Language Lecture 16
C Language Lecture 16C Language Lecture 16
C Language Lecture 16
 
Numerical analysis
Numerical analysisNumerical analysis
Numerical analysis
 

More from banu236831

Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
banu236831
 
os.ppt
os.pptos.ppt
os.ppt
banu236831
 
pointer in c++ -banu.pptx
pointer in c++ -banu.pptxpointer in c++ -banu.pptx
pointer in c++ -banu.pptx
banu236831
 
understanding-operating-systems-Banu.ppt
understanding-operating-systems-Banu.pptunderstanding-operating-systems-Banu.ppt
understanding-operating-systems-Banu.ppt
banu236831
 
distributed os.ppt
distributed os.pptdistributed os.ppt
distributed os.ppt
banu236831
 
Human Resource BPO.ppt
Human Resource BPO.pptHuman Resource BPO.ppt
Human Resource BPO.ppt
banu236831
 
NT-Soft-skills-PPT new.pptx
NT-Soft-skills-PPT new.pptxNT-Soft-skills-PPT new.pptx
NT-Soft-skills-PPT new.pptx
banu236831
 
C-FILE MANAGEMENT.pptx
C-FILE MANAGEMENT.pptxC-FILE MANAGEMENT.pptx
C-FILE MANAGEMENT.pptx
banu236831
 

More from banu236831 (8)

Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
os.ppt
os.pptos.ppt
os.ppt
 
pointer in c++ -banu.pptx
pointer in c++ -banu.pptxpointer in c++ -banu.pptx
pointer in c++ -banu.pptx
 
understanding-operating-systems-Banu.ppt
understanding-operating-systems-Banu.pptunderstanding-operating-systems-Banu.ppt
understanding-operating-systems-Banu.ppt
 
distributed os.ppt
distributed os.pptdistributed os.ppt
distributed os.ppt
 
Human Resource BPO.ppt
Human Resource BPO.pptHuman Resource BPO.ppt
Human Resource BPO.ppt
 
NT-Soft-skills-PPT new.pptx
NT-Soft-skills-PPT new.pptxNT-Soft-skills-PPT new.pptx
NT-Soft-skills-PPT new.pptx
 
C-FILE MANAGEMENT.pptx
C-FILE MANAGEMENT.pptxC-FILE MANAGEMENT.pptx
C-FILE MANAGEMENT.pptx
 

Recently uploaded

GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

c programming language.pptx

  • 1. Ms.K.Banupriya Assistant Professor Department of Information Technology Bon Secours College for Women, Thanjavur.
  • 2. C is the programming language developed by dennis M . Ritchie at Bell lab in USA. ‘c’ is a middle level language . UNIX operating system was written in ‘c’ language. ‘c’ language is used as most common platform for developing system programs.
  • 3.  It is one of the most popular computer language today because it is a structural,high-level machine independent language. It allows the developes to develop programs without worrying about the hardware about the platform where they will be implemented.
  • 4.
  • 5.  Programs written in c are efficient and fast.  There are only 32 keywords in ANSIC and its strength lies in this built-in-function.  C is highly portable.  C language is well suited for structured programming .  Another important feature of c is its ability to extend itself.
  • 6. #include<stdio.h> #include<math.h> Void main() { Clrscr() int a,b,c, printf(“Enter the value for a&b”); Scanf(%d%d”,&a&b); C=a+b; Printf(“The addition result is” getch(); }
  • 7.  c operator can be classified of a number categries.These are 1.arithmetic operator 2.Relation operator 3. Logical operator 4. assingment operator 5.increment &decrement opertor 6.condition operator 7. Bitwise operator 8. special operator
  • 8.  arithmetic operator is used to performing mathematical operations such as addition subtraction multiplication , division ,modules,. operator meaning + Addition _ Subtraction * Multiplication / Division % Module
  • 9. #include<stdio.h> #inlude<conio.h> Void main( ) { int a,b; Clrscr( ); Printf(“Enter the two value:n”); Scanf(“%d%d”,&a&b); Printf(“addition:n”,a+b); Printf(“subtraction:n”,a-b); Printf(“multiplicationm:n”,a*b); Printf(“division:n”,a/b); Printf(“module division:/n”,a%b); getch(); }
  • 10.  a relational operator checks the relational between two operands . If the relation is true ,it returns 1; if the relation is false , it returns value 0.relational operator are used in decision making and loops operator meaning < Is less than <= Is less than or equal to > Greater than >= Is greater than or equal to == Is equal to != Is not equal to
  • 11. #include<stdio.h> #include<conio.h> Void main( ) { int a,b; clrscr( ); Printf(Enter the two value:n”); Scanf(“%d%d,&a&b); If(a>b) { Printf(“A is the greater than:n”) } Else { Printf(“A is the greater than :/n”) } Getch( ) }
  • 12.  We use logical operator to perform various logical operations on any set of given expressions . logical operator meaning && Logical AND || Logical OR ! Logical NOT
  • 13. #include<stdio.h> #include<conio.h> Void main( ) { int a=40,b=20,c=30,D=40; clrscr( ); If(a>b&&c<d) Printf(A is greater than B OR D is greater than C”); Else Printf(logical OR function does not satisfied ”) Getch( ) }
  • 14.  Assignment operator are used to assigning value to a variable.  Left side operand of the assignment operator is a variable and right side operand of the assignment operator is a value compound assignment equivalent assignment A>>=B A=A>>B A&=58 A=A&58 A|=B A=A|B A^=B A=A^B A/=(B+C) A=A/(B+C) A%=(X%10) A=A%(X%10)
  • 15. PROGRAM: #include <stdio.h> #include<conio.h> Void main( ) { Int a=10,b=20 Clrscr( ); Printf(“A%d”,a); Printf(“n B%d”,b) a=a+b Printf(“nA%d”,a); Getch( ) }
  • 16.  ++ and - - operators are called increment and decrement operators.  they are unary operator needing only one operand.hence ++ as well - - operand can appear before or after the operand with same effect. compound assignment equivalent assignment A>>=B A=A>>B A&=58 A=A&58 A|=B A=A|B A^=B A=A^B A/=(B+C) A=A/(B+C) A%=(X%10) A=A%(X%10)
  • 17. PROGRAM: #include<stdio.h> #include<conio.h> Void main ( ) { Int a=10, Clrscr( ) Printf(“A++ is ,%d”,a++); Printf(“n A is ,%d”, a); Getch( ); }
  • 18.  conditional operator is a single programming statement ,while the if-else statement is a programming block in which statements come under the pranthesis. exp 1,exp 2, exp 3  This operator is used as a pointer to a variable . comma operator size of the operator
  • 19.  bitwise operator are character that represent action(bitwise operation) to be performed on single bits .  they operate at the binary level and perform operation on bit patterns that involve the manipulation of individual bits . operator meaning & bitwise AND | Bitwise OR ^ Bitwise exclisive OR << Left shift >> Right shift ~ One’s complement
  • 20. PROGRAM: #include<stdio.h> #<inlude<conio.h> Void main( ) { Int test=1; Int number; Printf(“input a numbern”) Scanf(“%d”,& number); While(number!=-1) { If(number&test) Printf(“Number is odd n”); Else Printf(“Number is even n”); Printf(“input a numbern”); Scanf(“%d”,&number); } }