Exercise 2-10. Rewrite the function lower, which converts upper case letters to lower case, with a conditional expression instead of if-else.
/* Exercise 2-10. Rewrite the function lower, which converts upper case letters to lower case, with a conditional expression instead of if-else. */#include<stdio.h>#define VERSION 2 /* change the version number to either 1 or 2 */intlower_V01(intc);intlower_V02(intc);intmain(){intc='Z';intlow_V01,low_V02;if(VERSION==1){low_V01=lower_V01(c);printf("lower case of %c if %c (V01)\n",c,low_V01);}elseif(VERSION==2){low_V02=lower_V02(c);printf("lower case of %c if %c (V02)\n",c,low_V02);}elseprintf("Entered version number is not correct\n");return0;}/* lower_V01: convert c to lower case; ASCII only */intlower_V01(intc){if(c>='A'&&c<='Z')returnc+'a'-'A';elsereturnc;}/* lower_V02: convert c to lower case; ASCII only w/0 if-else, using conditionals */intlower_V02(intc){return(c>='A'&&c<='Z')?(c+'a'-'A'):(c);}