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