SlideShare ist ein Scribd-Unternehmen logo
1 von 20
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);
}
}

Weitere ähnliche Inhalte

Ähnlich wie c programming language.pptx

C program report tips
C program report tipsC program report tips
C program report tips
Harry Pott
 
presentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptxpresentation_c_basics_1589366177_381682.pptx
presentation_c_basics_1589366177_381682.pptx
KrishanPalSingh39
 
Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01
Getachew Ganfur
 
Numerical analysis
Numerical analysisNumerical analysis
Numerical analysis
Vishal Singh
 

Ähnlich wie 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
 
complete data structure
complete data structurecomplete data structure
complete data structure
 
Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01Datastructurenotes 100627004340-phpapp01
Datastructurenotes 100627004340-phpapp01
 
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
 

Mehr von 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
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

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); } }