#include <stdio.h> void main( ){ char str[80]; int i; printf ("String is: \n"); scanf("%s",str); for (i=0; str[i]!='\0';i++) if (str[i]>='A' && str[i]<='Z') str[i]=str[i]+32; printf("Result is: %s\n",str); }
#include <stdio.h> void main() { char str[80]; int i; printf("String is: \n"); gets(str); for (i = 0; str[i] != '\0'; i++) if (str[i] >= 'A' && str[i] <= 'Z') str[i] = str[i] + 32; printf("Result is: %s\n", str); }