Name these operators :-
i) <
ii) ++
iii) &&
iv) ? :
Answers
Answered by
3
i) less than operator
ii) increment operator
iii) logical AND operator
iv) ternary operator
ii) increment operator
iii) logical AND operator
iv) ternary operator
Answered by
4
(1) Less than Operator:
#include<stdio.h>
void main()
{
int a=10;
if(a <=15 )
{
printf("This is called as Less than Operator");
}
getch();
}
Output: This is called as Less than Operator.
(2) Increment Operator.
#include<stdio.h>
void main()
{
int a = 4;
a = a++;
printf("%d",a);
getch();
}
Output:4.
(3) Logical AND operator:
#include<stdio.h>
void main()
{
int a=10,b=5;
if (a > b && b < a)
{
printf("You are better than me");
}
else
{
printf("I am better than You");
}
getch();
}
Output: You are better than me.
(4) Ternary Operator;
#include<stdio.h>
void main()
{
int a = 10,b;
b = a > 5 ? 100 : 200;
printf("%d",b);
getch();
}
Output: 100.
Hope this helps!
#include<stdio.h>
void main()
{
int a=10;
if(a <=15 )
{
printf("This is called as Less than Operator");
}
getch();
}
Output: This is called as Less than Operator.
(2) Increment Operator.
#include<stdio.h>
void main()
{
int a = 4;
a = a++;
printf("%d",a);
getch();
}
Output:4.
(3) Logical AND operator:
#include<stdio.h>
void main()
{
int a=10,b=5;
if (a > b && b < a)
{
printf("You are better than me");
}
else
{
printf("I am better than You");
}
getch();
}
Output: You are better than me.
(4) Ternary Operator;
#include<stdio.h>
void main()
{
int a = 10,b;
b = a > 5 ? 100 : 200;
printf("%d",b);
getch();
}
Output: 100.
Hope this helps!
Similar questions
Physics,
7 months ago
India Languages,
7 months ago
Computer Science,
1 year ago
Physics,
1 year ago
Physics,
1 year ago
English,
1 year ago