CP Lab – Experiment 11


Aim:  Demonstrate ternary operator and if-else

Objectives:  Learn, Understand and Demonstrate operators and decision control statement.

Hardware requirements: Any CPU with Pentium Processor or similar, 256 MB RAM or more, 1 GB Hard Disk or more.

Software requirements:  Windows 64 bit Operating System, compatible gcc compiler, Netbeans 8.0 or later, jdk 1.6 or later, TurboC compiler



Exercise: Write a program in C to

  1. Largest of 2 numbers using ternary (?:) operator
  2. Find all Roots of a Quadratic equation and print if they are real, equal or imaginary using if-else
  3. Check Whether a Character is an Alphabet or not


R.No Name of Student Date of Performance Date of Evaluation Grade Sign of student Sign of Faculty

Leave a Reply

Your email address will not be published. Required fields are marked *