Conditional Operator in C
Get Certified in C Programming and Take Your Skills to the Next Level
Program 1
// Implementation of Conditional operator
// ? :
#include<stdio.h>
#include<conio.h>
int main()
{
system("cls");
char ch;
printf("Enter a character: ");
ch=getche();
ch=='a'||ch=='e'||ch=='o'||ch=='i'||ch=='u' ||ch=='A'||ch=='E'||ch=='O'||ch=='I'||ch=='U'?printf("\nVowel"):printf("\nNot a Vowel");
// int a,b,c,d,x,y,z;
// printf("Enter four Number");
// scanf("%d%d %d%d",&a,&b,&c,&d);
// x=a>b?a:b;
// y=c>d?c:d;
// z=x>y?x:y;
// printf("Grater no is %d: ",z);
return 0;
}
We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

