C program to convert the lower case into upper case

 

C program

C PROGRAM

C program to convert the lower case into upper case

#include <stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
  char str[25],i;
  printf("\n enter the string=");
  scanf("%s",str);
  for(i=0;i<=strlen(str);i++)
  {
    if(str[i]>=97&&str[i]<=122)
    str[i]=str[i]-32;
    }
    printf("\n upper case string is:%s",str);
    }

OUTPUT :

enter the string=natpethunai

 upper case string is:NATPETHUNAI

Process finished


infinitynotes00



No comments:

Post a Comment




Copyright Ⓒ 2022 | Mechpedia | All Right Reserved.