Rewrite the following using ternary operators:

if(x>y)
c=‘A’;
else
c=‘a’;


Solution



char c= x>y ? 'A':'a';


Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com