top of page
Wave
Cactus%20Plant_edited.jpg

UPPER CASE TO LOWER CASE

#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE *fp1,*fp2;
    char ch;
    fp1=fopen("E:/test2.txt","r");
    if(fp1==NULL)
    {
        printf("Sourse file not open properly ");
        exit(0);
    }
    fp2=fopen("e:/test1.txt","w");
    if(fp2==NULL)
    {
        printf("Tergect file not open properly ");
        exit(0);
    }
    while((ch=fgetc(fp1))!=EOF)
    {
        if(ch>64&&ch<91)
        ch=ch+32;
        fputc(ch,fp2);
    }
    fclose(fp1);
    fclose(fp2);
    printf("Upper case to lower case convertion sucessfully ");
    return 1;
}

Cactus%20Plant_edited.jpg

LOWER CASE TO UPPER CASE

#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE *fp1,*fp2;
    char ch;
    fp1=fopen("E:/test1.txt","r");
    if(fp1==NULL)
    {
        printf("Sourse file not open properly ");
        exit(0);
    }
    fp2=fopen("e:/test2.txt","w");
    if(fp2==NULL)
    {
        printf("Tergect file not open properly ");
        exit(0);
    }
    while((ch=fgetc(fp1))!=EOF)
    {
        if(ch>=97)
        ch=ch-32;
        fputc(ch,fp2);
    }
    fclose(fp1);
    fclose(fp2);
    printf("Lower case to upper case convertion sucessfully ");
    return 1;
}

Subscribe Form

Thanks for submitting!

  • Facebook
  • YouTube
  • Instagram
  • Twitter

©2020 by Abhisek Midya ( A18 ). Proudly created with Wix.com

bottom of page