# C program to find maximum or minimum using macro

Write a C program to find maximum and minimum of two numbers using macro. How to find maximum or minimum between two numbers using macro in C program. Logic to find maximum and minimum using macro in C.

Continue reading C program to find maximum or minimum using macro

# Conditional operator programming exercises and solutions in C

Conditional operator is a ternary operator used to evaluate expression based on some condition. Conditional operator is a replacement of small if...else statements. It takes three operand conditional-expression, true-expression and false-expression It is also known as ternary operator, inline if, ternary if etc.

# C program to check alphabets using Conditional operator

Write a C program to input a character and check whether the character is alphabet or not using Conditional/Ternary operator `?:`. How to check alphabets using conditional operator in C programming.

Example

Input

`Enter any character: a`

Output

`It is ALPHABET`

# C program to check leap year using Conditional operator

Write a C program to input a year and check whether year is leap year or not using conditional/ternary operator `?:`. How to check leap year using conditional operator in C programming.

Example

Input

```Input year: 2016
```

Output

```2016 is Leap Year
```

# C program to check even or odd number using conditional operator

Write a C program to input a number and check whether number is even or odd using Conditional/Ternary operator `?:`. How to check even or odd numbers using conditional operator in C program.

Example

Input

```Input num: 10
```

Output

```10 is even.
```

# C program to find maximum between three numbers using conditional operator

Write a C program to input three numbers from user and find maximum between three numbers using conditional/ternary operator `?:`. How to find maximum between three numbers using conditional operator.

Example

Input

```Input num1: 10
Input num2: 20
Input num3: 30
```

Output

```Maximum is 30
```

# C program to find maximum between two numbers using conditional operator

Write a C program to input two numbers and find maximum between two numbers using conditional/ternary operator `?:`. How to find maximum or minimum between two numbers using conditional operator in C program.

Example

Input

```Input first number: 10
Input second number: 20```

Output

```Maximum: 20
```