C program to convert uppercase to lower case


Hey guys from now we would be giving C Programs tutorials also.we thought of expanding our topics so i thought why not expand it from the heart of computers that is C programming.

So here is the first code i would start with.. its actually easy. 🙂

Code to convert upper case to lower case is:-

#include<stdio.h>
#include<string.h>

int main(){

char str[20];

int i;

printf(“Enter any string->”);

scanf(“%s”,str);

printf(“The string is->%s”,str);

for(i=0;i<=strlen(str);i++){

if(str[i]>=65&&str[i]<=90)

str[i]=str[i]+32;

}

printf(“\nThe string in lower case is->%s”,str);

return 0;

}

Hope You find this useful 🙂 If the code doesn’t work please let us know below in the comments 🙂

thanks for stopping by and keep coding.

 

Advertisements

Say Your Mind Buddy!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s