To convert uppercase characters to lowercase

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
    char str[80], con[80] , ch;
    int i = 0;
    clrscr();
    printf("Enter the text in uppercase : ");
    gets(str);
    printf("\nThe converted text is : \n\n");
    while(str[i] != '\0')
    {
        if(str[i] != ' ')
        printf("%c", str[i] + 32);
        else
        putchar(' ');
        i++;
    }
    getch();
}

Output:

Enter the text in uppercase : Anna University
The converted text is :
anna university