Conditional operator

Current Categories - C-programming
 
*Conditional operators – it is a ternary operator.
->     ' ? ' - is known as conditional operator.

syntax:-    value1?value2:value3;

->     if value1 is true,then value2 is returned ,else value3.

Symbol Name
? conditional operator

Example-let us make a programm,which will take a integer number and find it whether it is greater than zero or not by using conditional operator.
 

*Output-

enter a number:10
greater than zero
copyright@
MyFreeCopyright.com Registered & Protected
 facebook-logo