In this video, I have discussed about the Ternary Operator in C Programming Language. There is only one Binary Operator in C Language that is the Conditional Operator, which is used to select between the set of statements to be executed. The conditional operator is used as a selection based flow of control of the program. Till now we have only seen the sequential program flow in which all the statements of the program were executed one after the other, but the conditional operator provides the selection based program flow in which at a conditional point we have two paths, depending on the truth value of the condition, The selection of path is made. The program which is discussed in the video to demonstrate the concept is given below:
Please add stdio.h and conio.h header files to the following code:
void main()
{
int a;
clrscr();
printf(“Enter a number: “);
scanf(“%d”,&a);
(a%2==0) ? printf(“%d is even”,a) : printf(“%d is odd”,a);
getch();
}
The time stamp links are given below:
1. Ternary Operators - 00:28
2. Working of Ternary Operater - 04:01
3. Program of Ternary Operator - 09:02
C - Character Set and Tokens -
• C - Character Set and Tokens
Tokens in C Language Programming - • Tokens in C Language Programming
First C program -
• First C program
Getting input in a C program using scanf -
• Getting input in a C program using scanf
How to install Software and Run C Program in Windows -Environment - • How to install Software and Run C Program ...
A Simple Calculator program in c programming language -
• A Simple Calculator program in c programmi...
Binary operators C Programming Language -
• Binary operators C Programming Language
Unary Operators in C Programming Language -
• Unary Operators in C Programming Language
Bitwise Operators in C Programming Language -
• Bitwise Operators in C Programming Language
Use of Conditional Operator and if else construct in C Programming Language - • Use of Conditional Operator and if else co...
Precedence and Associativity of Operators in C Programming Language - • Precedence and Associativity of Operators ...
Working of scanf for more than one inputs at a time. -
• Working of scanf for more than one inputs ...
Swapping values of two variables with and without using third variable - • Swapping values of two variables with and ...
Data Types and Type Conversion in C Programming Language. -
• Data Types and Type Conversion in C Progra...
Format specifiers in C Programming Language -
• Format specifiers in C Programming Language
_____________________________________________________________
★ Click Here To Subscribe: https://bit.ly/2JZJyuO
★ Business or Media contact: education.classes22@gmail.com
_______________________________________________________________
Auf dieser Seite können Sie das Online-Video Ternary Operator (Conditional Operator) in C Programming Language mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Sugandh's Recipe 28 September 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,165 Mal angesehen und es wurde von 56 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!