C examples for Data Type:char
Convert c to lower case; ASCII only
#include <stdio.h> int lower(int c){ if (c >= 'A' && c <= 'Z') return c + 'a' - 'A'; else//from w ww . ja v a 2s .c o m return c; } int main() { int c; while ((c = getchar()) != EOF) putchar(lower(c)); return 0; }