August 10, 2011
Ex 2-10

Rewrite the function lower, which converts upper case letters to lower case, with a conditional expression instead of if-else .

int lower(int c)
{
        return c >= ‘A’ && c <= ‘Z’: c + ‘a’ - ‘A’, c;

}

2:45pm  |   URL: http://tmblr.co/Zi3hLy893TC_
Filed under: K&amp;R