24-Write a C program to show the working of conditional operator.

Program: 24

Write a C program to show the working of conditional operator.

#include
#include
void main()
{
    int x, y;
    printf("Enter first number: ");
    scanf("%d", &x);
    printf("Enter second number: ");
    scanf("%d", &y);
    (x==y?printf("True"):printf("False"));
    getch();
}
Output
Enter first number: 54

Enter second number: 54

True

Lokesh Kumar: Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.
Related Post
Leave a Comment

This website uses cookies.