C Programming
C Operators
An operator is the symbol that take one or more than one operand and perform operation on it.
Ex. int a,b, c;
a=10,b=20;
c=a+b; // Here a, b is operand and + is operator
C provides following types of operators to perform different types of operations:
- Arithmetic Operators
- Relational Operators
- Shift Operators
- Logical Operators
- Bitwise Operators
- Ternary or Conditional Operators
- Assignment Operator
- Misc Operator
Related Posts:
Write a C program to input two no and print the sum without using third variable : C Programming
3. Write a C program to input two no and print the sum without using third variable
void main()
{
int a,b; // variable declaration
printf("Enter two nos."); // message t… Read More
Write a C program to input two number and print the sum using third variable : C Programming
Write a C program to input two number and print the sum using third variable.
void main()
{
int first,second,sum; // Variable declaration
printf("Enter Two No.");
printf("%d%d",&first,&second);… Read More
Program to input two nos and perform simple operation : C Programming
Program to input two nos and perform simple operation.
void main()
{
int a,b;
printf("Enter two nos.");
scanf("%d%d", &a,&b);
printf("\nAddition=%d",a+b);
printf("\nSubstraction=%d",a-b);
printf("\nMultiplication=%d… Read More
Write a C program to input two nos and swap it : C Programming
C Programming
Write a C program to input two nos and swap it.
void main()
{
int a,b,c;
printf("Enter two nos.");
scanf("%d%d",&a,&b);
c=a;
a=b;
b=c;
printf("Swaped value a=%db=%d",a,b);
getch();
}
Input: &nbs… Read More
Write a C program to input principal, rate and time(in year) and find simple interest and final amount : C Programming
Write a C program to input principal, rate and time(in year) and find simple interest and final amount.
void main()
{
float p,r,t,si,fa;
printf("Enter Principal amount, rate and time.");
scanf("%f%f%f",&p,&r,&t… Read More