C program to convert the string from lower case to upper case.

source code


#include<stdio.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]>=97&&str[i]<=122)
            str[i]=str[i]-32;
  }
  printf("\nThe string in lowercase is->%s",str);
getch();
  return 0;
}

Comments

Popular posts from this blog

C program for multiplication of two matrices.

String copy without using strcpy in C.

8086 STRING MANIPULATION –FIND AND REPLACE A WORD